-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNonlinearRecursiveDivisionMod.h
69 lines (54 loc) · 1.23 KB
/
NonlinearRecursiveDivisionMod.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef ALGO_NONLINEAR_RECURSIVE_DIVISION_MOD_H
#define ALGO_NONLINEAR_RECURSIVE_DIVISION_MOD_H
/* File that defines the Nonlinear Recursive Division Mod algorithm.
A non-discrete-walled form of Nonlinear Recursive Division.
Algorithm details:
*/
/*
Possible solution: build all walls and THEN break holes in them?
111111
1111WW
111WW2
11WW22
1WW222
1W2222
Can't determine whether to keep recursing based on size, you could get a single very long twisty passage
Problematic situation:
###
###.#
#...#
##..#
####
######
##...#
#....#
#...##
###.#
###
Taking it for granted that small rooms can't be eliminated with this algorithm.
Can't really do dimension-based limits on rooms because they can be irregular.
In situations like this, X can become a wall:
...1...
...1...
..11...
..1X...
..11...
...1...
...1...
So walls can clump together in this algorithm, and it can't be helped.
When walls are being built in a space with straight walls (a rectangular space),
it is not possible for there to be no place to break it in a single space.
When they are diagonal, that can happen:
..1...
.11...
11..22
....2.
*/
#include "MazeAlgorithm.h"
namespace Maze {
class RecursiveBacktrackerMod : public Algorithm {
private:
public:
};
}
#endif