-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdontgointhere.action.php
95 lines (70 loc) · 1.89 KB
/
dontgointhere.action.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
<?php
/**
*------
* BGA framework: © Gregory Isabelli <[email protected]> & Emmanuel Colin <[email protected]>
* DontGoInThere implementation : © Evan Pulgino <[email protected]>
*
* This code has been produced on the BGA studio platform for use on https://boardgamearena.com.
* See http://en.doc.boardgamearena.com/Studio for more information.
* -----
*
* dontgointhere.action.php
*
* DontGoInThere main action entry point
*
*/
class action_dontgointhere extends APP_GameAction
{
// Constructor: please do not modify
public function __default()
{
if( self::isArg( 'notifwindow') ) {
$this->view = "common_notifwindow";
$this->viewArgs['table'] = self::getArg( "table", AT_posint, true );
} else {
$this->view = "dontgointhere_dontgointhere";
self::trace( "Complete reinitialization of board game" );
}
}
public function changeDie()
{
self::setAjaxMode();
$dieId = self::getArg("dieId", AT_posint, true);
$this->game->changeDie($dieId);
self::ajaxResponse();
}
public function dispelSet()
{
self::setAjaxMode();
$cardType = self::getArg("cardType", AT_posint, true);
$this->game->dispelSet($cardType);
self::ajaxResponse();
}
public function placeMeeple()
{
self::setAjaxMode();
$room = self::getArg("room", AT_posint, true);
$space = self::getArg("space", AT_posint, true);
$this->game->placeMeeple($room, $space);
self::ajaxResponse();
}
public function rollDice()
{
self::setAjaxMode();
$this->game->rollDice();
self::ajaxResponse();
}
public function skip()
{
self::setAjaxMode();
$this->game->skip();
self::ajaxResponse();
}
public function takeCard()
{
self::setAjaxMode();
$cardId = self::getArg("cardId", AT_posint, true);
$this->game->takeCard($cardId);
self::ajaxResponse();
}
}