isOpen method

bool isOpen(
  1. int x,
  2. int y
)

true if the tile at column x row y is a valid position and is open

Implementation

bool isOpen(int x, int y) {
  if (_tiles.isValid(Vec2(x, y))) {
    return get(x, y).isOpen;
  } else {
    return false;
  }
}