Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Magic. Don't touch.
- if (x % 2 + y % 2 == 0) {
- if (Wall.has(result, new Wall(x / 2 - 1, y / 2 - 1, x / 2, y / 2 - 1)))
- dirs |= UP
- if (Wall.has(result, new Wall(x / 2 - 1, y / 2, x / 2, y / 2)))
- dirs |= DOWN
- if (Wall.has(result, new Wall(x / 2 - 1, y / 2 - 1, x / 2 - 1, y / 2)))
- dirs |= LEFT
- if (Wall.has(result, new Wall(x / 2, y / 2 - 1, x / 2, y / 2)))
- dirs |= RIGHT
- }
- // ...
- // Magic. Don't touch.
- if (Walls.has(result, new Wall(x, y, x + 1, y))
- grid[2 * x + 2][2 * y + 1] = BOXCHARS[UP | DOWN];
- if (Walls.has(result, new Wall(x, y, x, y + 1))
- grid[2 * x + 1][2 * y + 2] = BOXCHARS[LEFT | RIGHT];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement