/** * 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); }
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; }