-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReadMe
More file actions
54 lines (50 loc) · 924 Bytes
/
ReadMe
File metadata and controls
54 lines (50 loc) · 924 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
Tic Tac Toe and Connect Four using common code.
The Object oriented JS code contains simple AI and game simulation.
-There are two players. Once denoted as "X". The other denoted as "O". Empty spaces are denoted at "-".
-The game starts with all spaces being empty.
-Each player takes turns claiming one space per turn.
-If the board fills up, then the game is over and there is no winner.
-If a connection is made there is a winner. 3 for tic tac toe and 4 for connect four.
TIC TAC TOE
BOARD
|-|X|-|
|-|-|-|
|-|-|-|
GAMEOVER? False
BOARD
|-|X|-|
|-|-|-|
|-|o|-|
GAMEOVER? False
.
.
.
.
BOARD
|o|X|X|
|X|o|o|
|X|o|X|
GAMEOVER?
THE GAME ENDED IN A DRAW
CONNECT FOUR
BOARD
|-|-|-|-|-|-|
|-|-|-|X|-|-|
|-|-|-|-|-|-|
|-|-|-|-|-|-|
|-|-|-|-|-|-|
|-|-|-|-|-|-|
GAMEOVER? False
.
.
.
.
.
BOARD
|-|o|-|-|-|-|
|o|o|-|X|-|X|
|o|-|X|X|-|X|
|-|X|o|-|-|X|
|-|-|-|X|-|X|
|o|o|-|-|-|o|
GAMEOVER? True