Boards¶
At the very core each board is just a Uint8Array
where each element represents a cell. A single cell has information weather it is enabled or not and wall in different
directions.
A board in just a view on top if this Uint8Array
which basically just defines the neighbourhood of each cell.
Each board needs to have following 3 functions:
getNeighbours
: get neighbour cell indexes at given index.removeInterWall
: remove wall between two cell indexesgetRows
: get array of rows of cell indexes
Built-in Boards¶
Mazes101 comes with following builtin boards:
- Rectangular Board
- Weave Board
- Circular Board
- Hexagonal Board (coming soon...)
- Triangular Board (coming soon...)
Custom Boards¶
Adding a support for any other board type is also not that difficult. See Custom Boards fore more details.