public FindPlot ( int x, int y, int w, int d, PlotClaimType &type ) : int | ||
x | int | |
y | int | |
w | int | |
d | int | |
type | PlotClaimType | |
return | int |
public int FindPlot(int x, int y, int w, int d, out PlotClaimType type)
{
if (cityPlots.Count <= 0)
{
type = PlotClaimType.CLAIM_NONE;
return (-1);
}
int idx = 0;
foreach (BuildingPlot p in cityPlots)
{
if (p.Equals(MakePlot(x, y, w, d,PlotClaimType.CLAIM_BUILDING|PlotClaimType.CLAIM_COMPLEX)))
{
type = p.PlotClaimType;
return (idx);
}
idx++;
}
type = PlotClaimType.CLAIM_NONE;
return (-1);
}