Circular Board¶
Usage¶
import {newBoard} from 'mazes101/boards/circular';
let board = newBoard({radius: 7});
import {newFromBaseBoard} from 'mazes101/boards/circular';
let board = newFromBaseBoard(baseBoard, {radius: 7});
Anatomy¶
Size Parameters¶
A rectangular board has two size parameters:
radius: ItsinnerRadius
Position¶
Position of each cell is represented by polar coordinates where:
ris rth row from center, starts from first visible rowtis nth cell in rth row
Directions¶
Each cell in a rectangular board utilizes 4 directions as following:
- Top clockwise (mask:
0b00001or1) - Top counter-clockwise (mask:
0b00010or2) - Right (mask:
0b00100or4) - Bottom (mask:
0b01000or8) - Left (mask:
0b10000or16)
If there is only one top cell it will be considered in top clockwise direction.