-
Notifications
You must be signed in to change notification settings - Fork 0
/
egyptianratscrew.action.php
57 lines (53 loc) · 1.57 KB
/
egyptianratscrew.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
<?php
/**
*------
* BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
* Egyptian Ratscrew implementation : 0BuRner <https://github.com/0BuRner>
*
* 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.
* -----
*
* egyptianratscrew.action.php
*
* Egyptian Ratscrew main action entry point
*
*
* In this file, you are describing all the methods that can be called from your
* user interface logic (javascript).
*
* If you define a method "myAction" here, then you can call it from your javascript code with:
* this.ajaxcall( "/emptygame/emptygame/myAction.html", ...)
*
*/
class action_egyptianratscrew extends APP_GameAction
{
public function __default()
{
if (self::isArg('notifwindow')) {
$this->view = "common_notifwindow";
$this->viewArgs['table'] = self::getArg("table", AT_posint, true);
} else {
$this->view = "egyptianratscrew_egyptianratscrew";
self::trace("Complete reinitialization of board game");
}
}
public function playCard()
{
self::setAjaxMode();
$this->game->playCard();
self::ajaxResponse();
}
public function slapPile()
{
self::setAjaxMode();
$this->game->slapPile();
self::ajaxResponse();
}
public function validateTurn()
{
self::setAjaxMode();
$this->game->validateTurn();
self::ajaxResponse();
}
}