-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes on game structure
86 lines (61 loc) · 1.29 KB
/
notes on game structure
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
78
79
80
81
82
83
84
//Old
{ "$id": "70540079",
"$priority": null,
"host": "ddd",
"id": 55233,
"players":
{ "Player1": "ddd",
"Player2": "Computer",
"Player3": "Computer",
"Player4": "Computer"
},
"status": "active"
}
//New possible version
{ "$id": "70540079",
"$priority": null,
"host": "ddd", //Must be set
"id": 55233, //Must be set
"polyominoNum": 5,
"dimensions": 20,
"currentTurn": "blue",
"numColors": 4, //always 4 or 2.
"status": "lobby" //either "lobby","start","playing","over"
"player":
{ "blue": {
"name": "Bob",
"id": 1241292,
"piecesLeft": "1|2|3",
"hasPassed": false,
"isAI": false
},
"yellow": {
"name": "Computer1",
"id": 1241292,
"pieces": "1|2|3",
"hasPassed": false,
"isAI": true
}, //would only be two if numcolors
"green": { //was two, and would only be
"name": "Bob", //blue and green.
"id": 1241292,
"pieces": "1|2|3",
"hasPassed": false,
"isAI": false
},
"red": {
"name": "Computer1",
"id": 1241292,
"pieces": "1|2|3",
"hasPassed": false,
"isAI": true
},
},
//Start stuff which is not set in the lobby.
board:
{
row1: "NNNNNNNNNNNNNNNNNNNN",
row2: "NNNNNNNNNNNNNNNNNNNN",
row3: "NNNNNNNNNNNNNNNNNNNN"
}
}