Exemplo n.º 1
0
 public void AddArmy(Army newarmy)
 {
     foreach (Squad squad in newarmy.squads)
     {
         foreach (Unit unit in squad.units)
         {
             unit.ID = units.Count;
             units.Add(unit);
             unit.Location.X = rand.RandInt(255);
             unit.Location.Y = rand.RandInt(255);
             unit.Type = 0;
             unit.State = "idle";
             report.PlaceUnit(0, unit.ID, (int)unit.Location.X, (int)unit.Location.Y);
         }
     }
 }
Exemplo n.º 2
0
 public bool BattleCheck(Army army)
 {
     return (location.DistanceTo(army.X, army.Y) < 80); //10 is arbitrary and will be replaced by a variable later on
 }