-
-
Save anonymous/bf49d9f7c974eccc7fb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maze.size.times do |i| | |
if maze.cells[i].x >=1 && maze.cells[i].x < (maze.size - 2) && maze.cells[i].y >=1 &&maze.cells[i].y < (maze.size - 2) | |
direc = maze.cells[i].openings | |
if direc.include?("u") && direc.include?("d") | |
bridges += 1 | |
end | |
if direc.include?("l") && direc.include?("r") | |
bridges += 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment