Exemplo n.º 1
0
 public void AddPlayerLobbyTest()
 {
     var lobby = new Lobby(new LobbyConfig());
     var player = new BasePlayer();
     lobby.AddPlayers(new BasePlayerGroup(player));
     Assert.IsTrue(lobby.PlayerList.Contains(player));
 }
Exemplo n.º 2
0
 private Lobby CreateXPersonLobby(int numberOfPlayers = 4, int numberOfGroups = 1)
 {
     var lobby = new Lobby(new LobbyConfig());
     for (var i = 0; i < numberOfGroups; i++)
     {
         lobby.AddPlayers(CreateXPlayerGroup(numberOfPlayers));
     }
     return lobby;
 }
Exemplo n.º 3
0
 public void AddPlayerAndGroupLobbyTest()
 {
     var lobby = new Lobby(new LobbyConfig());
     var player = new BasePlayer();
     lobby.AddPlayers(new BasePlayerGroup(player));
     var group = CreateXPlayerGroup(2);
     lobby.AddPlayers(group);
     Assert.AreEqual(3, lobby.PlayerList.Count);
 }
Exemplo n.º 4
0
        public void RemovePlayerGroupFromLobbyTest()
        {
            var lobby = new Lobby(new LobbyConfig());
            var group1 = CreateXPlayerGroup(4);
            var group2 = CreateXPlayerGroup(4);

            lobby.AddPlayers(group1);
            lobby.AddPlayers(group2);

            lobby.RemovePlayers(group1);
        }
Exemplo n.º 5
0
 public void NewLobbyTest()
 {
     var lobby = new Lobby(new LobbyConfig());
     var playerList = lobby.PlayerList;
     Assert.AreEqual(0, playerList.Count);
 }