Example #1
0
 public GameTable(LoginResponse loginResponse, InitiateGameResponse initiateGameResponse, Socket clientSocket)
 {
     LoginResponse        = loginResponse;
     InitiateGameResponse = initiateGameResponse;
     this.ClientSocket    = clientSocket;
     InitializeComponent();
 }
Example #2
0
        private void HandleInitiateGameResponse(string initiateGameResponse)
        {
            InitiateGameResponse response = JsonConvert.DeserializeObject <InitiateGameResponse>(initiateGameResponse);

            if (response != null)
            {
                initiateGame(response);
            }
        }
Example #3
0
 private void initiateGame(InitiateGameResponse initiateGameResponse)
 {
     table = new GameTable(loginResponse, initiateGameResponse, clientSocket);
     table.CanStartGame = true; // the owner of the game can only start the game.
 }