Exemplo n.º 1
0
 public TPlayer(TGame Game)
 {
     for (int i = 0; i < HeroesCount; i++)
     {
         var rnd  = TGame.Random;
         var hero = new THero();
         hero.Player      = this;
         hero.CurrentCell = Game.FreeCells[rnd.Next(Game.FreeCells.Count)];
         hero.Name        = i.ToString();
         Heroes.Add(hero);
     }
 }
Exemplo n.º 2
0
 public void NextTurn()
 {
     ActivePlayer = Players[(Players.IndexOf(ActivePlayer) + 1) % Players.Count];
     ActiveHero   = ActivePlayer.Heroes[0];
 }