-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstates.inc.php
137 lines (126 loc) · 3.52 KB
/
states.inc.php
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
/**
*------
* BGA framework: © Gregory Isabelli <[email protected]> & Emmanuel Colin <[email protected]>
* papayoo implementation : © Guillaume NAVEL <[email protected]>
*
* This code has been produced on the BGA studio platform for use on http://boardgamearena.com.
* See http://en.boardgamearena.com/#!doc/Studio for more information.
* -----
*
* states.inc.php
*
* papayoo game states description
*
*/
$machinestates = [
// The initial state. Please do not modify.
ST_BGA_GAME_SETUP => [
"name" => "gameSetup",
"description" => clienttranslate("Game setup"),
"type" => "manager",
"action" => "stGameSetup",
"transitions" => [ "" => ST_NEW_HAND]
],
ST_NEW_HAND => [
"name" => "newHand",
"description" => "",
"type" => "game",
"action" => "stNewHand",
"updateGameProgression" => true,
"transitions" => [
"play" => ST_THROW_DICE,
"give" => ST_GIVE_CARDS,
],
],
ST_GIVE_CARDS => [
"name" => "giveCards",
"description" => clienttranslate('Some players must choose ${nbr_cards} cards to give to player at position +${n}'),
"descriptionmyturn" => clienttranslate('${you} must choose ${nbr_cards} cards to give to player at position +${n}'),
"type" => "multipleactiveplayer",
"action" => "stGiveCards",
"args" => "argGiveCards",
"possibleactions" => [ "giveCards" ],
"transitions" => [
"giveCards" => ST_TAKE_CARDS,
"skip" => ST_TAKE_CARDS,
]
],
ST_TAKE_CARDS => [
"name" => "takeCards",
"description" => "",
"type" => "game",
"action" => "stTakeCards",
"transitions" => [
"throwDice" => ST_THROW_DICE,
"skip" => ST_THROW_DICE
]
],
ST_THROW_DICE => [
"name" => "throwDice",
"description" => "",
"type" => "game",
"action" => "stThrowDice",
"transitions" => [
"startHand" => ST_NEW_TRICK,
"skip" => ST_NEW_TRICK
]
],
// Trick
ST_NEW_TRICK => [
"name" => "newTrick",
"description" => "",
"type" => "game",
"action" => "stNewTrick",
"transitions" => [ "" => ST_PLAY_CARD]
],
ST_PLAY_CARD => [
"name" => "playerTurn",
"description" => clienttranslate('${actplayer} must play a card'),
"descriptionmyturn" => clienttranslate('${you} must play a card'),
"type" => "activeplayer",
"args" => "argPlayCard",
"possibleactions" => [ "playCard" ],
"transitions" => [ "cardPlayed" => ST_NEXT_PLAYER ]
],
ST_NEXT_PLAYER => [
"name" => "nextPlayer",
"description" => "",
"type" => "game",
"action" => "stNextPlayer",
"transitions" => [
"nextPlayer" => ST_PLAY_CARD,
"endTrick" => ST_END_OF_TRICK,
]
],
ST_END_OF_TRICK => [
"name" => "endOfTrick",
"description" => "",
"type" => "game",
"action" => "stEndOfTrick",
"transitions" => [
"nextTrick" => ST_NEW_TRICK,
"endHand" => ST_END_HAND
]
],
// End of the hand (scoring, etc...)
ST_END_HAND => [
"name" => "endHand",
"description" => "",
"type" => "game",
"action" => "stEndHand",
"transitions" => [
"nextHand" => ST_NEW_HAND,
"endGame" => ST_BGA_GAME_END
]
],
// Final state.
// Please do not modify.
ST_BGA_GAME_END => [
"name" => "gameEnd",
"description" => clienttranslate("End of game"),
"type" => "manager",
"action" => "stGameEnd",
"args" => "argGameEnd"
]
];