One card is dealt (from a deck of four) to each player. Then 4 cards (from a separate deck) are dealt to the center display.
I have the first part working, but not the second.
In the game.php file:
and:
however, when I inspect the result (by using console.log(this.gamedatas) in the js file), I see "hand" as a card (as it should be) but "cardsontable" is an empty array.
I have the first part working, but not the second.
In the game.php file:
Code: Select all
$door = $this->cards->pickCard( 'doordeck', $player_id );
$cards = $this->cards->pickCardsForLocation(4, 'deck', 'cluecarddisplay');
Code: Select all
protected function getAllDatas()
{
$result = array();
...
// The card in the player's hand
$result['hand'] = $this->cards->getCardsInLocation( 'hand', $current_player_id );
// Cards played on the table
$result['cardsontable'] = $this->cards->getCardsInLocation( 'cluecarddisplay' );
return $result;
}