private void disconnectClientsAndRemoveGame(PlayingGame currentGame, int gameId)
        {
            Disconnect(currentGame.Player1);
            Disconnect(currentGame.Player2);

            currentGames.Remove(gameId);
        }
 private void updateTurn(string playerWithTurn, PlayingGame currentGame)
 {
     if (playerWithTurn == currentGame.Player1)
     {
         currentGame.Turn = currentGame.Player2;
     }
     else
     {
         currentGame.Turn = currentGame.Player1;
     }
 }
        private PlayingGame initPlayingGame(string player1, string player2, IConnectFourServiceCallback player1CallBack, IConnectFourServiceCallback player2CallBack)
        {
            PlayingGame game = new PlayingGame();

            game.GameStartTime   = DateTime.Now;
            game.Turn            = player1;
            game.Player1         = player1;
            game.Player2         = player2;
            game.CallBackPlayer1 = player1CallBack;
            game.CallBackPlayer2 = player2CallBack;
            game.Board           = new ConnectFourBoard(6, 7);
            return(game);
        }
 private void updateCellForAnotherPlayer(string playername, int insertionRowIndex, int column, PlayingGame currentGame, MOVE_RESULT move)
 {
     // update other player that the other one has own
     if (playername == currentGame.Player1)
     {
         currentGame.CallBackPlayer2.updateCell(insertionRowIndex, column, move);
     }
     else if (playername == currentGame.Player2)
     {
         currentGame.CallBackPlayer1.updateCell(insertionRowIndex, column, move);
     }
 }