Browse code

Use a smaller representation for maze cells

Robert Cranston authored on 21/05/2025 20:25:47
Showing 2 changed files

... ...
@@ -10,7 +10,7 @@ Features:
10 10
     -   Hunt And Kill
11 11
         -   Handles mazes of any size
12 12
         -   Random with seed (time in seconds since the epoch by default)
13
-        -   Fairly fast (10000*10000 cells in ~1200ms)
13
+        -   Fairly fast (10000*10000 cells in ~1100ms)
14 14
 
15 15
 [`cxx-maze`]: https://git.rcrnstn.net/rcrnstn/cxx-maze
16 16
 
... ...
@@ -19,7 +19,7 @@ Features:
19 19
 ```
20 20
 $ make
21 21
 $ ./maze dummy
22
-1264ms
22
+1154ms
23 23
 $ ./maze
24 24
 ██  ████████████████████████████████████████████████████████████████████████████
25 25
 ██  ██                          ██              ██      ██          ██      ████
... ...
@@ -8,7 +8,7 @@
8 8
 
9 9
 struct Maze
10 10
 {
11
-    enum Cell
11
+    enum Cell : char
12 12
     {
13 13
         INVALID,
14 14
         EDGE,