Exemplo n.º 1
0
    private Coordinate MatchFreeBase(List<Coordinate> coords, WeewarMap wmap, Game g, Faction myFaction)
    {

      //Console.WriteLine("Coords:"+coords );
      foreach (Coordinate c in coords)
      {
        Terrain t = wmap.get(c);
        //Console.WriteLine("type :"+t.Type );
        Faction owner = g.getTerrainOwner(c);
        if (t.Type == TerrainType.Base && (owner == null || owner != myFaction) && g.getUnit(c) == null)
          return c;
      }
      return null;
    }