Esempio n. 1
0
 private function assertPlayerStoneCount($stoneCount, Player $player)
 {
     $this->assertCount($stoneCount, $player->getStones());
 }
Esempio n. 2
0
 private function assertPlayerHasStones(Player $player, array $stoneValues)
 {
     $stones = $player->getStones();
     $this->assertEquals(count($stoneValues), count($stones), 'player should have ' . count($stoneValues) . ' stone(s)');
     reset($stoneValues);
     foreach ($stones as $stone) {
         $values = current($stoneValues);
         $topValue = $values[0];
         $bottomValue = $values[1];
         $this->assertEquals($topValue, $stone->getTopValue());
         $this->assertEquals($bottomValue, $stone->getBottomValue());
         next($stoneValues);
     }
 }