-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameFunctions.txt
102 lines (63 loc) · 1.46 KB
/
gameFunctions.txt
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SET HASH OF GAMES
set player ready - in firebase, when register is set.
g.checkReady <---add listener????
g.areAllPlayersReady
g.runOneRound
g.runOneRegister
p.playCard
p.rotate
p.setCardinal
p.cardMove
p.checkMove --come back to this. calls old getTile
p.checkForEdgeOrPit --get tile here, too
p.loseLife
p.killPlayer
g.runBelts() x2
g.getTileAt
getRotation
p.boardMove
g.runPushers
g.runGears
g.fireRobotLasers
g.fireOneLaser
g.getPlayerAt
p.applyDamage
p.accrueDamage
p.checkDamage
g.fireBoardLasers
g.fireLasersInCol
g.touchFlags
p.touchFlag
g.touchRepair
g.emptyRegisters
p.emptyRegister
g.setWinStatus
g.dealCards
g.shuffleDeck
g.initiateDecisionState
to do:
cope with players pushing each other
pause game and return to it?
not called yet:
p.iAmReady - call in route
p.setRegister
g.initalizeGame - call in route
g.assignDocks
g.dealCards
to write:
g.pushGameState at end of each phase
g.sendGameStates at end of round or on win
array of players:
one player:
id
+position
+bearing
-register (array of 5 null/cards)
-hand
+damage
+lives
+flag count
hash of games: {
'lfjwk3v9gjkgdi': [{ players:[], isWon}], //x10
'gjrv9ir4j9f0bek': [{ players:[], isWon}] //x10
}