Esempio n. 1
0
 /**
  * @param string $gameId
  * @param string $word
  * @return Game
  */
 public static function gameStart($gameId, $word)
 {
     Assertion::uuid($gameId, "Not a valid uuid");
     $game = new Game();
     $dateTime = new \DateTime("now");
     $game->apply(new GameStarted($gameId, $word, $dateTime));
     return $game;
 }
Esempio n. 2
0
 public static function createGame($gameId, $word)
 {
     $game = new Game();
     $game->apply(new GameStarted($gameId, $word));
     return $game;
 }