Пример #1
0
 public void CreateGame(Guid gameId)
 {
     using (var db = MvcApplication.Store.OpenSession())
     {
         var newGame = new GameSession(db.Query<Game>().Single(g => g.Id == gameId));
         _games.Add(newGame);
     }
 }
Пример #2
0
 public void LeaveGame()
 {
     _game.RemovePlayer(this);
     _game = null;
 }
Пример #3
0
 public void JoinGame(GameSession game)
 {
     _game = game;
 }