Exemplo n.º 1
0
 public void modifyPlayer(Player player, string newname, bool terran, bool zerg, bool protoss, bool random)
 {
     HumanPlayers.Remove(player.Name);
     player.Name = newname;
     player.raceMask(terran, zerg, protoss, random);
     HumanPlayers.Add(newname, player);
     computeRanks();
 }
Exemplo n.º 2
0
 public void AddHuman(ICharacter human)
 {
     HumanPlayers.Add(human);
 }
Exemplo n.º 3
0
 public void addPlayer(string name, bool terran, bool zerg, bool protoss, bool random, string terranLvl, string zergLvl, string protossLvl, string randomLvl)
 {
     HumanPlayers.Add(name, new Player(name, terran, zerg, protoss, random));
     if (terranLvl.Equals(Constants.Unranked))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloUnranked;
     }
     else if (terranLvl.Equals(Constants.Bronze))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloBronze;
     }
     else if (terranLvl.Equals(Constants.Silver))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloSilver;
     }
     else if (terranLvl.Equals(Constants.Gold))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloGold;
     }
     else if (terranLvl.Equals(Constants.Platine))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloPlatine;
     }
     else if (terranLvl.Equals(Constants.Diamond))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloDiamond;
     }
     else if (terranLvl.Equals(Constants.Master))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloMaster;
     }
     else if (terranLvl.Equals(Constants.GrandMaster))
     {
         HumanPlayers[name].Elo[Constants.Terran] = Constants.EloGrandMaster;
     }
     if (zergLvl.Equals(Constants.Unranked))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloUnranked;
     }
     else if (zergLvl.Equals(Constants.Bronze))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloBronze;
     }
     else if (zergLvl.Equals(Constants.Silver))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloSilver;
     }
     else if (zergLvl.Equals(Constants.Gold))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloGold;
     }
     else if (zergLvl.Equals(Constants.Platine))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloPlatine;
     }
     else if (zergLvl.Equals(Constants.Diamond))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloDiamond;
     }
     else if (zergLvl.Equals(Constants.Master))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloMaster;
     }
     else if (zergLvl.Equals(Constants.GrandMaster))
     {
         HumanPlayers[name].Elo[Constants.Zerg] = Constants.EloGrandMaster;
     }
     if (protossLvl.Equals(Constants.Unranked))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloUnranked;
     }
     else if (protossLvl.Equals(Constants.Bronze))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloBronze;
     }
     else if (protossLvl.Equals(Constants.Silver))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloSilver;
     }
     else if (protossLvl.Equals(Constants.Gold))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloGold;
     }
     else if (protossLvl.Equals(Constants.Platine))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloPlatine;
     }
     else if (protossLvl.Equals(Constants.Diamond))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloDiamond;
     }
     else if (protossLvl.Equals(Constants.Master))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloMaster;
     }
     else if (protossLvl.Equals(Constants.GrandMaster))
     {
         HumanPlayers[name].Elo[Constants.Protoss] = Constants.EloGrandMaster;
     }
     if (randomLvl.Equals(Constants.Unranked))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloUnranked;
     }
     else if (randomLvl.Equals(Constants.Bronze))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloBronze;
     }
     else if (randomLvl.Equals(Constants.Silver))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloSilver;
     }
     else if (randomLvl.Equals(Constants.Gold))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloGold;
     }
     else if (randomLvl.Equals(Constants.Platine))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloPlatine;
     }
     else if (randomLvl.Equals(Constants.Diamond))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloDiamond;
     }
     else if (randomLvl.Equals(Constants.Master))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloMaster;
     }
     else if (randomLvl.Equals(Constants.GrandMaster))
     {
         HumanPlayers[name].Elo[Constants.Random] = Constants.EloGrandMaster;
     }
 }
Exemplo n.º 4
0
 public void addPlayer(string name, bool terran, bool zerg, bool protoss, bool random)
 {
     HumanPlayers.Add(name, new Player(name, terran, zerg, protoss, random));
     computeRanks();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Adds a human player.
 /// </summary>
 /// <param name="humanPlayer">Human player to be added.</param>
 public void AddHumanPlayer(AbstractPlayer humanPlayer)
 {
     HumanPlayers.Add(humanPlayer);
     GameMap.AddCreature(humanPlayer);
 }