public function toArray()
 {
     return ['dealerCard' => $this->serializeCard($this->dealerHand->getFaceUpCard()), 'playerHand' => $this->serializeHand($this->playerHand), 'money' => $this->player->getChips()->getAmount()];
 }
 public function toArray()
 {
     return ['minimumBet' => $this->minimumBet, 'maximumBet' => $this->maximumBet, 'money' => $this->player->getChips()->getAmount()];
 }
Beispiel #3
0
 public function acceptPlayerBet(Player $player, HandBetPair $hand, $amount)
 {
     try {
         $player->getChips()->bet($amount);
         $hand->increaseBet($amount);
     } catch (\Exception $reason) {
         return \React\Promise\reject($reason);
     }
     return \React\Promise\resolve();
 }
 private function serializePlayer(Player $player = null)
 {
     return ['name' => $player->getName(), 'money' => $player->getChips()->getAmount()];
 }
 /**
  * @return array
  */
 public function toArray()
 {
     return ['seatIndex' => $this->player->getSeat()->getSeatIndex(), 'betAmount' => $this->betAmount, 'money' => $this->player->getChips()->getAmount()];
 }