-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes
More file actions
38 lines (27 loc) · 1.97 KB
/
notes
File metadata and controls
38 lines (27 loc) · 1.97 KB
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
notes:
-svg grid is 700 x 700
-winningCombinations = [123, 456, 789, 147, 258, 369, 159, 357]
-233 width each square and 233 height each square
-210px seperating each x/y point for the x's
bugs/to add:
-can place a nought/cross while game status is waiting for opponent
causes a glitch on the opponents screen where it display noughts and crosses in the same field
maybe make it so nothing can be touched until 2.5 seconds after players found (FIXED)
-no finished screen on a draw (FIXED)
-cant tell if other player has left the match (FIXED) seems to be buggy? cant reproduce errors?? (FIXED)
-can be player two even if there is no player one making you just wait for player1 to do something
IDEAS if you get player two and it detects there is not opponent using a new function that tics every 250 ms it will go to a new session and do the check again (if you get player 2 again) until a player is found (FIXED)
-game draws when all squares are filled and the last square someone wins.. it still says draw
it keeps running the draw/winner functions through the updateOpponentMove function which gets activated by the ready() function messages from the server
harder to fix than expected, might have to fix the draw function itself
(FIXED)
-TO ADD - no time limit on turn (easy) (DONE)
-TO ADD - custom player name (easy)
-TO ADD - way to play again against the same opponent as before (easy)
-TO ADD - a way to make a custom game, to play against a friend (medium)
-TO ADD - a way to play against AI (hard)
make it check every possible move and see if it takes it closer to winning
if opponent has 2 places in a row
and if there is a spare space on either side of the 2 spaces, place one there
for each empty space on the board, run the minimax algorithim, store each space as 1 for win, 2 for loose, 0 for tie
LATEST NOTE - all you really gotta do is keep running the checkwinner function after every new move test on the board and backtrack to determine which path is the most likely or least likely to win