Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }