1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! ### Shapes - Some functions to create various shapes of mazes.
/// Creates a directional line of length `n`, starting at `0`.
///
/// For example, `dir_line(4)`:
///
/// ```text
/// 0 → 1 → 2 → 3
/// ```
/// Creates a rectangle where every cell is connected to its
/// right and down neighbors.
///
/// For example:
///
/// ```text
/// 0 → 1 → 2
/// ↓ ↓ ↓
/// 3 → 4 → 5
/// ↓ ↓ ↓
/// 6 → 7 → 8
/// ```