-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.c
81 lines (69 loc) · 1.63 KB
/
intro.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <windows.h>
#include "intro.h"
void intro2()
{
system("cls");
printf("\n\n\n\n\n");
printf("\t\t\t\t\tPlay\n\n");
printf("\t\t\t\t > How to play <\n\n");
printf(" Press E to select, S to move down, W to move up\n");
}
void howToPlay()
{
system("cls");
printf("\n\n\n\n\n");
printf("\n\n\n Thua ngai!!!, co rat nhieu nguoi ngoai hanh tinh dang tan cong trai dat cua chung ta\n");
printf("\n xin nguoi hay dieu khien phi thuyen cua minh de tieu diet chung no.\n");
printf("\n Ngai su dung cac phim mui ten de di chuyen va ban dan.\n");
printf("\n Up: ban laser, Left: sang trai, Right: sang phai \n");
printf("\n Duoc roi, ngai nhan Q de tro lai man hinh chinh hoac nhan ENTER de bat dau.\n");
printf("\n\n\n Chuc ngai may man!!!!!");
}
void mainscreen()
{
system("cls");
printf("\n\n\n\n\n");
printf("\t\t\t\t > Play <\n\n");
printf("\t\t\t\t How to play\n\n");
printf(" Press E to select, S to move down, W to move up\n");
int t = 0;
char key = getch();
if(key == 's')
{
intro2();
key = getch();
if(key == 'e')
{
howToPlay();
key = getch();
if(key == 'q')
{
mainscreen();
}
}
else
{
mainscreen();
}
}
else if(key == 'e')
{
return;
}
else
{
mainscreen();
}
}
void intro()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),9);
printf("\n\n\n\n\n");
printf("\n\n\n\t\t\tCUOC XAM LANG CUA NGUOI NGOAI HANH TINH\n\n");
printf("\n\n\n Nhan phim bat ki de bat dau!!!");
getch();
mainscreen();
}