I think:
`
if (Maze.map[y][x] == Maze.SquareType.OBSTACLE || Maze.map[y][x] == Maze.SquareType.WALL) {
    return '0';
}
return '1';  // Open
`