public Square Add(int x, int y) { var square = new Square(this, x, y); Squares.Add(square); return square; }
bool IsValidForAdd(Square square) { return !(square.IsHazard || availableSquares.Contains(square)); }
void Available(Square square) { if (IsValidForAdd(square)) availableSquares.Add(square); }
void AvailableAround(Square square) { if (visited.Contains(square)) return; foreach (var item in square.Around()) Available(item); visited.Add(square); }
public void Location(int x, int y) { currentLocation = map.FindOrAdd(x, y); }