Ejemplo n.º 1
0
 /// <summary>
 /// Can go from a source to a destination tile
 /// </summary>
 public bool CanMoveTo(ITile source, ITile destination)
 {
     int idToSelect = 0;
     for (int i = 0; i < source.OccupyingUnits.Count; i++)
         if (source.OccupyingUnits[i].State == UnitState.Selected)
         {
             idToSelect = i;	break;
         }
     return algo.CanMoveTo(source.X, source.Y, destination.X, destination.Y, ((source.IsOccupied() && source.OccupyingUnits[idToSelect].CheckMove(destination)) ? (int) source.OccupyingUnits[idToSelect].Faction : -1));
 }