Deleted rubyscreen.dll, eradicated semicolons from when... statements, compiling is now before setting up the system, appeased vocal dissenters

This commit is contained in:
Maruno17
2020-11-26 21:10:45 +00:00
parent 017cdb8d0f
commit eb22e49d9b
73 changed files with 905 additions and 817 deletions

View File

@@ -335,22 +335,31 @@ class Maze
end
end
def recurseDepthFirst(x,y,depth)
def recurseDepthFirst(x, y, depth)
setVisited(x,y)
dirs=@@dirs.shuffle!
dirs = @@dirs.shuffle!
for c in 0...4
d=dirs[c]
cx=0;cy=0
d = dirs[c]
cx = 0
cy = 0
case d
when EdgeMasks::North; cx=x; cy=y-1
when EdgeMasks::South; cx=x; cy=y+1
when EdgeMasks::East; cx=x+1; cy=y
when EdgeMasks::West; cx=x-1; cy=y
when EdgeMasks::North
cx = x
cy = y - 1
when EdgeMasks::South
cx = x
cy = y + 1
when EdgeMasks::East
cx = x + 1
cy = y
when EdgeMasks::West
cx = x - 1
cy = y
end
if cx>=0 && cy>=0 && cx<cellWidth && cy<cellHeight
if !getVisited(cx,cy)
clearEdgeNode(x,y,d)
recurseDepthFirst(cx,cy,depth+1)
if cx >= 0 && cy >= 0 && cx < cellWidth && cy < cellHeight
if !getVisited(cx, cy)
clearEdgeNode(x, y, d)
recurseDepthFirst(cx, cy, depth + 1)
end
end
end