public void AddMultyplayerGame(string name, TcpClient client) { Maze maze = this.GetMaze(name); MultyplayerGame game = new MultyplayerGame(client, name, maze); MultyplayerGames.Add(name, game); MazesByClients.Add(client, game); }
public void AddSecondPlayer(string name, TcpClient client) { MultyplayerGame game = null; MultyplayerGames.TryGetValue(name, out game); game.SecondPlayer = client; games.Remove(name); MazesByClients.Add(client, game); }
public bool GameIsFull(string name) { MultyplayerGame game = null; MultyplayerGames.TryGetValue(name, out game); int num = game.NumberOfPlayers; // if num == 1 then the game is not full if (num == 1) { return(false); } return(false); }