UNPKG

@ludw1gj/maze-generation

Version:

Maze generation algorithms.

23 lines 605 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DIRECTIONS = ["NORTH", "EAST", "SOUTH", "WEST"]; function getOppositeDirection(dir) { switch (dir) { case "NORTH": { return "SOUTH"; } case "EAST": { return "WEST"; } case "SOUTH": { return "NORTH"; } case "WEST": { return "EAST"; } default: throw new Error("invalid direction given"); } } exports.getOppositeDirection = getOppositeDirection; //# sourceMappingURL=direction.js.map