public GetNeighbors ( |
||
stall | ||
return | IEnumerable |
public IEnumerable<Stall> GetNeighbors(Stall stall)
{
int stallIndex = this.stalls.IndexOf(stall);
if (stallIndex > 0)
yield return this.stalls[stallIndex - 1];
if (stallIndex < this.stalls.Count - 1)
yield return this.stalls[stallIndex + 1];
}