-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmainthing.cpp
More file actions
57 lines (50 loc) · 896 Bytes
/
mainthing.cpp
File metadata and controls
57 lines (50 loc) · 896 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
45
46
47
48
49
50
51
52
53
54
55
56
57
main:
switch(mode){
case 1://pvp
play();
break;
case 2://pve
play(diff, startOrder)
break;
default://All hell has broken loose
cout << "The fuck did you do?!?!?";
break;
}
void play(){
gameBoard b;
int turn = 0;
int p1 = 0;
int p2 = 0;
for(i = 0, i < 36, i++){
if(turn % 2 == 0){
mouseinput(p1)
p1 = checker(board, x, y, 1, p1);
}
else{
mouseinput(p2);
p2 = checker(board, x, y, 1, p2);
}
}
void play(int diff, int start){
gameBoard b;
int turn,
int playerScore = 0;
int AIScore = 0;
if(starter == 1)
turn = 0;
else
turn = 1;
for(i = 0; i < 36; i++){
if(turn % 2 == 0)
mouseinput
playerScore = checker(board, x, y, 1, playerScore);
else
AI(board);
AIScore = checker(board, x, y, -1, AIScore);
}
if a > b
print player 1 wins
if a < b
print player 2 wins
if a = b
print Tie