-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
55 lines (53 loc) · 1.34 KB
/
main.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
#include"header.h"
#include"game.h"
extern char one[20];
extern char zero[20];
char game[R][C];
void main()
{
system("clear");
int i,j;
for(i=0;i<R;i++) //assigning * to the array
{
for(j=0;j<C;j++)
game[i][j]='*';
}
gotomn(11,6);
printf(" Game: \'zero-one\' Developer: Nikhil Kumar Mishra");
printf("\n\n\n\n\n\nEnter a button to continue");
getch();
system("clear");
gotomn(12,7);
printf("This game will play by number keys 1-9\n\n\n");
gotomn(1,7);
printf("Do you want to see the rules of this game(y/n)");
//while(getchar!='\n');
if(getch()=='y')
{
system("clear");
rules();
}
system("clear");
gotomn(15,6);
printf("Enter the name of Player who choose \'one\'\n\n");
gets(one);
printf("\n\nGreat Job! press a key to continue\n");
getch();
system("clear");
gotomn(10,6);
printf("Enter the name of Player who choose \'zero\'\n\n");
fgets(zero,20,stdin);
printf("\n\nGreat Job! press a key to continue\n");
// while(getchar!='\n');
getch();
system("clear");
gotomn(15,7);
printf("To start game press any key and to quit press 0");
if(getch()==48)
{
system("clear");
exit(0);
}
system("clear");
Game();
}