-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·59 lines (59 loc) · 1.85 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="jquery-3.1.1.slim.min.js"></script>
<script src="game.js"></script>
<link rel="Stylesheet" href="style.css" />
<title>Game of Life</title>
</head>
<body>
<div id="cwrap">
<div class="cgroup">
<form id="import_export" action="#">
<button type="submit" id="import">Import</button>
<button type="button" id="export">Export</button><br />
<textarea id="asjson"></textarea>
</form>
</div>
<div class="cgroup">
<form id="settings" action="#">
<label>Width: <input type="number" id="width" value="100" min="0" /></label><br />
<label>Height: <input type="number" id="height" value="100" min="0" /></label><br />
<label>Neighbors:<br /><textarea id="neigh">[-1, -1],
[-1, 0],
[-1, 1],
[0, -1],
[0, 1],
[1, -1],
[1, 0],
[1, 1]</textarea></label><br />
<label>Death: <input type="text" id="death" value="neigh < 2 || neigh > 3" /></label><br />
<label>Birth: <input type="text" id="birth" value="neigh == 3" /></label><br />
<button type="submit" id="submit">Update</button><br />
</form>
</div>
<div class="cgroup">
<form id="control" action="#">
<input type="number" id="step" value="1" min="1" />
<span class="vertical">
<button type="submit" id="tick">Forward</button>
<button type="button" id="prev">Revert</button>
</span>
</form>
<form id="control2" action="#">
<label><input type="number" id="interval" value="300" min="0" /> ms</label>
<span class="vertical">
<button type="submit" id="play">Play</button>
<button type="button" id="rev">Reverse</button>
</span>
<span id="counter">0</span>
<button type="button" id="reset_counter">Reset counter</button>
</form>
</div>
</div>
<div id="twrap">
<table id="t"></table>
</div>
</body>
</html>