-
Notifications
You must be signed in to change notification settings - Fork 2
/
rakefile
146 lines (118 loc) · 2.89 KB
/
rakefile
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# frozen_string_literal: true
# default task to run most of the demos
desc 'Run most of the demos'
task default: %w[
algorithms:aldous_broder
algorithms:aldous_broder_coloured
algorithms:binary_tree
algorithms:binary_tree_colour
algorithms:hunt_and_kill
algorithms:recursive_backtracker
algorithms:sidewinder
algorithms:sidewinder_colour
algorithms:wilsons
masks:image_mask
masks:ascii_mask
]
# Mask demos
namespace :masks do
desc 'Generates a maze using an image mask'
task :image_mask do
ruby 'demos/image_mask_demo.rb masks/mask1.png'
end
desc 'Generates a maze using an ASCII mask'
task :ascii_mask do
ruby 'demos/ascii_mask_demo.rb masks/mask1.txt'
end
desc 'Demonstrates a simple ASCII mask'
task :simple_mask do
ruby 'demos/simple_mask_demo.rb'
end
end
# Algorithm demos
namespace :algorithms do
desc 'Algorithm demo: Binary Tree'
task :binary_tree do
ruby 'demos/binary_tree_demo.rb'
end
desc 'Algorithm demo: Binary Tree, with colour'
task :binary_tree_colour do
ruby 'demos/binary_tree_colour_demo.rb'
end
desc 'Algorithm demo: Sidewinder'
task :sidewinder do
ruby 'demos/sidewinder_demo.rb'
end
desc 'Algorithm demo: Sidewinder, with colour'
task :sidewinder_colour do
ruby 'demos/sidewinder_colour_demo.rb'
end
desc 'Algorithm demo: Recursize Backtracker'
task :recursive_backtracker do
ruby 'demos/recursive_backtracker_demo.rb'
end
desc 'Algorithm demo: Aldous Broder, with colour'
task :aldous_broder_coloured do
ruby 'demos/aldous_broder_coloured_demo.rb'
end
desc 'Algorithm demo: Aldous Broder'
task :aldous_broder do
ruby 'demos/aldous_broder_demo.rb'
end
desc 'Algorithm demo: Wilsons'
task :wilsons do
ruby 'demos/wilsons_demo.rb'
end
desc 'Algorithm demo: Hunt and Kill'
task :hunt_and_kill do
ruby 'demos/hunt_and_kill_demo.rb'
end
desc 'Algorithm demo: Kruskal'
task :kruskal do
ruby 'demos/kruskal_demo.rb'
end
end
# distances demos
namespace :distances do
desc 'Shows the longest path in a maze'
task :longest_path do
ruby 'demos/longest.path_demo.rb'
end
desc 'Counts the dead ends maze generated with a selection of algoritms'
task :dead_ends do
ruby 'demos/deadend_counts.rb'
end
desc "Distances: Distra's algorithm"
task :dikstra do
ruby 'demos/dikstra_demo.rb'
end
end
# shapes
namespace :shapes do
desc 'Polar Grid'
task :polar do
ruby 'demos/polar_grid_demo.rb'
end
desc 'Hex Grid'
task :hex do
ruby 'demos/hex_demo.rb'
end
desc 'Triangle Grid'
task :triangle do
ruby 'demos/triangle_demo.rb'
end
end
namespace :advanced do
desc 'Braided Grid'
task :braid do
ruby 'demos/braided_recursive_backtracker.rb'
end
desc 'Weighted Maze'
task :weighted do
ruby 'demos/weighted_maze.rb'
end
desc 'Weave Maze'
task :weave do
ruby 'demos/weave_maze.rb'
end
end