-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
24 lines (18 loc) · 939 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//LOGIC
//A. Get the necessary variables needed.
//the start button, all the boxes on screen, computer move array
//1. User clicks start game button
//2. Generate COmputer's first move
//2A. Update computer move array
//3. indicate the move on screen(i.e flash the sqaure)
//4. Play the correct audio
// WE TAKE A PAUSE HERE
//5. This is the end of the function that runs when the user clicks the start game button.
//6. User clicks a square.(we use an event listener on all the squares and we listen for a click)
// 7. We run a function that does the following
// 7a. indicate the move on screen(i.e flash the square)
// 7b. Plays the correct audio
// 7c. checks if the move is the correct one
// 7d. if move is correct, it creates the next computer move.(i.e redo number 2, 2a, 3 and 4)
// WE TAKE A PAUSE HERE
//8. This is the end of the function that runs when the user clicks a correct square