-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (32 loc) · 828 Bytes
/
index.html
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
<meta charset="utf-8"/>
<style>
body {
padding-top: 10vh;
text-align: center;
}
a {
display: block;
padding: 10px 0;
}
input {
width: 50px;
}
</style>
<title>Random maze generators</title>
<h1>Random maze generators</h1>
<label>
Cell size (in pixels):
<input type="text" value="50" id="cell-size">
</label>
<a href="#" id="link-backtracker">Recursive backtracker</a>
<a href="#" id="link-prim">Prim</a>
<script>
const get = id => document.getElementById(id)
const cellSize = () => get('cell-size').value
get('link-backtracker').addEventListener('click', () => {
location.href = 'recursive-backtracker.html?cell-size=' + cellSize()
})
get('link-prim').addEventListener('click', () => {
location.href = 'prim.html?cell-size=' + cellSize()
})
</script>