Example #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);
     }
 }
Example #2
0
 public void LeaveGame()
 {
     _game.RemovePlayer(this);
     _game = null;
 }
Example #3
0
 public void JoinGame(GameSession game)
 {
     _game = game;
 }