예제 #1
0
 /**
  * @param Game $game
  * @throws GameServiceException
  */
 private function checkGameStarted(Game $game)
 {
     if ($game->isStarted()) {
         throw new GameServiceException("Can't run a game that has already started");
     }
 }
예제 #2
0
 public function test_it_returns_true_for_game_with_not_empty_board_when_checking_if_game_has_started()
 {
     $this->board->shouldReceive("isEmpty")->andReturn(false);
     $this->assertTrue($this->game->isStarted());
 }