This app creates mazes for you to save as text.
The project was created @MakeSchool. You can find the project instructions here.
This project was refactored during an intensive period. You can find the intensive proposal here.
To use on your local machine, follow these instructions:
- download this project onto your machine (using git, or as a .zip, etc).
- run
yarnin your terminal to download required npm packages. - run
yarn startto begin running the project locally in a browser. - open the project in your browser at http://localhost:3000/
The code is released under the MIT License.
This project was bootstrapped with react. Check out its readme here.
SHAPE NEEDED
- Maze.isIndexValid (id) -> (boolean)
- Maze.areNeighbors (Array of IDs) -> (boolean)
- Maze.getCoordinates (Array of IDs) -> (Coordinates)
- Maze.getTensorSlice (Coordinates) -> (Array of IDs)
- Maze.getNeighbors (id) -> (Record of Directions to IDs)
SHAPE NOT NEEDED
- Cell.addNeighbor (id)
- Cell.addPassage (id)
- Cell.hasPath () -> (boolean)
- Cell.hasWall () -> (boolean)
{
"algorithm":"recursive breadth-first traversal",
"map":{
"dimensions":[
3,
2
],
"magnitudes":[
1,
3
],
"size":6,
"data":[
{
"id":0,
"status":"complete",
"neighbors":{
"east":1,
"south":3
},
"passages":{
"west":false,
"east":false,
"north":false,
"south":true
}
},
{
"id":1,
"status":"complete",
"neighbors":{
"west":0,
"east":2,
"south":4
},
"passages":{
"west":false,
"east":true,
"north":false,
"south":true
}
},
{
"id":2,
"status":"complete",
"neighbors":{
"west":1,
"south":5
},
"passages":{
"west":true,
"east":false,
"north":false,
"south":true
}
},
{
"id":3,
"status":"complete",
"neighbors":{
"east":4,
"north":0
},
"passages":{
"west":false,
"east":true,
"north":true,
"south":false
}
},
{
"id":4,
"status":"complete",
"neighbors":{
"west":3,
"east":5,
"north":1
},
"passages":{
"west":true,
"east":false,
"north":true,
"south":false
}
},
{
"id":5,
"status":"complete",
"neighbors":{
"west":4,
"north":2
},
"passages":{
"west":false,
"east":false,
"north":true,
"south":false
}
}
]
},
"compass":{
"layout":"square",
"rose":{
"west":-1,
"east":1,
"north":-3,
"south":3
},
"directions":[
"west",
"east",
"north",
"south"
],
"antipodes":{
"west":"east",
"east":"west",
"north":"south",
"south":"north"
}
}
}