-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstates.inc.php
70 lines (62 loc) · 1.97 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
<?php
/**
*------
* BGA framework: Gregory Isabelli & Emmanuel Colin & BoardGameArena
* Tapas implementation : © Copyright 2024, Philip Davis (mrphilipadavis AT gmail)
*
* 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.
* -----
*/
// !! It is not a good idea to modify this file when a game is running !!
if (!defined('BGA_STATE_START'))
{
define('BGA_STATE_START', 1);
define('STATE_PLAYER_TURN', 10);
define('STATE_NEXT_TURN', 20);
define('BGA_STATE_END', 99);
}
$machinestates = [
// The initial state. Please do not modify.
BGA_STATE_START => [
'name' => 'gameSetup',
'description' => '',
'type' => 'manager',
'action' => 'stGameSetup',
'transitions' => [
'' => STATE_PLAYER_TURN,
],
],
STATE_PLAYER_TURN => [
'name' => 'playerTurn',
'description' => clienttranslate('${actplayer} must place a Tapas'),
'descriptionmyturn' => clienttranslate('${you} must choose a Tapas'),
'type' => 'activeplayer',
'possibleactions' => [ 'placeTile' ],
'args' => 'argsPlayerTurn',
'transitions' => [
'endTurn' => STATE_NEXT_TURN,
],
],
// This is just here to update the game progression.
STATE_NEXT_TURN => [
'name' => 'nextTurn',
'description' => '',
'type' => 'game',
'action' => 'stNextTurn',
'updateGameProgression' => true,
'transitions' => [
'nextTurn' => STATE_PLAYER_TURN,
'gameOver' => BGA_STATE_END,
],
],
// Final state.
// Please do not modify (and do not overload action/args methods).
BGA_STATE_END => [
'name' => 'gameEnd',
'description' => clienttranslate('End of game'),
'type' => 'manager',
'action' => 'stGameEnd',
'args' => 'argGameEnd'
],
];