Ejemplo n.º 1
0
 /**
  * Adds a card to this hand
  *
  * @param Poker\Table\Contracts\Card $card
  */
 public function addCard(Contracts\Card $card)
 {
     if ($this->cardLimit == $this->cardCount()) {
         throw new InvalidHandException("An attempt was made to add a card to a hand which had already hit it\\'s legal limit of cards");
     }
     parent::addCard($card);
 }
Ejemplo n.º 2
0
Archivo: price.php Proyecto: mmr/b1n
 public function readDeck($f)
 {
     $d = new Deck();
     $xml = simplexml_load_file($f);
     foreach ($xml->zone->card as $c) {
         $d->addCard($c['name'], $c['number']);
     }
     return $d;
 }