Exemplo n.º 1
0
        //Client requests new game
        public void RequestNewGame(M_Player myPlayer)
        {
            var gameState = new M_GameState();

            try
            {
                gameState = gameController.CreateNewGameState(myPlayer);
            }
            catch (Exception e)
            {
                Clients.Caller.DisplayError("Oops! Something went wrong :( Try that again!", e);
            }

            string gameKey = gameState.GameId;

            Groups.Add(Context.ConnectionId, gameKey);
            UpdatePlayerListScreen(gameKey);
        }