forked from xmu310/Final-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
44 lines (44 loc) · 1014 Bytes
/
main.c
File metadata and controls
44 lines (44 loc) · 1014 Bytes
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
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#include"src/def.h"
#include"src/func.h"
int main(){
int32_t num;
while(1){
system("clear");
printf("Please enter the player number(4-7, Exit:0): ");
if(!num_scanf(&num)){
printf("Not integer!\n");
}else if(!num){
return 0;
}else if(num<4||num>7){
printf("number should be in 4 to 7\n");
}else break;
sleep(1);
}
if(!set_game(num)){printf("Error!\n");return 0;}
while(1){
system("clear");
print_all_status();
printf("Now: Player%d\n",PlayerNow+1);
sleep(1);
if(have_card(player[PlayerNow].equip,Dynamite)){
printf("Dynamite determine:");
}
if(have_card(player[PlayerNow].equip,Jail)){
}
if(player[PlayerNow].role==Black_Jack){
}else if(player[PlayerNow].role==Jesse_Jones){
}else if(player[PlayerNow].role==Kit_Carlson){
}else if(player[PlayerNow].role==Pedro_Ramirez){
}else{
//for(int i=0;i<2;i++)printf
}
next_round();
}
print_who_win();
return 0;
}