示例#1
0
 private function distributeCards(DiscardPile $discardPile, array $players, $nbCards)
 {
     for ($i = 0; $i < $nbCards; $i++) {
         foreach ($players as $player) {
             $discardPile->dealToPlayer($player, $this->round);
         }
         $this->round++;
     }
 }
示例#2
0
 private function givenGameIsCreated(EventStream $eventStream, DiscardPile $discardPile, Player $human, Player $bank)
 {
     $eventStream->getUuid()->willReturn(Uuid::uuid1());
     $eventStream->getIterator()->willReturn(new \ArrayIterator(array(new GameCreated(array($human->getWrappedObject(), $bank->getWrappedObject()), $discardPile->getWrappedObject(), 2))));
     $this->loadFromEventStream($eventStream);
 }