Пример #1
0
 /**
  * @return Game
  */
 public function createGame()
 {
     $game = new Game();
     $game->setPlayers(array('white' => $this->createPlayer($game, 'white'), 'black' => $this->createPlayer($game, 'black')));
     $game->setCreator($game->getPlayer('white'));
     return $game;
 }
Пример #2
0
 public function setPlayers()
 {
     $game = new Game();
     $game->setPlayers($this->createPlayerStubs());
     $this->assertEquals(2, count($game->getPlayers()));
 }