/** * Deals the stones to the players and starts the game. */ public function deal() { $stones = []; for ($top = 0; $top < 7; ++$top) { for ($bottom = $top; $bottom < 7; ++$bottom) { $stones[] = new Stone($top, $bottom); } } shuffle($stones); foreach ($this->players as $player) { $player->addStones(array_splice($stones, 0, 7)); } $this->setFirstTurn(); $this->state->start(); }
/** @dataProvider provideIsEqualStateData */ public function testIsEqualTestsForSameName(State $state1, State $state2, $expectedEqual) { $this->assertSame($expectedEqual, $state1->isEqual($state2)); }