-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
33 lines (33 loc) · 1.91 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Competitive Game of Life</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<p>
A 2 player competitive game of life
B<input id="bornOn" type="text" onInput="board.changeRules()" placeholder="2" style="width:50px"></input>
S<input id="liveOn" type="text" onInput="board.changeRules()" placeholder="23" style="width:50px"></input>
</p>
<canvas id="boardCanvas" style="border:1px solid #000000;background-color:lightgrey;">
</canvas>
<input id="gridToggle" type="checkbox" onInput="board.toggleGrid()">grid off</input>
<input id="freeplay" type="checkbox" onInput="board.toggleMode()">freeplay</input>
<input id="wrap" type="checkbox" onInput="board.toggleWrap()">wrap</input>
<input id="parasite" type="checkbox" onInput="board.toggleParasite()">parasite</input>
<input id="width" type="number" min="2" onInput="board.resize()" placeholder="width" style="width:50px"></input>
<input id="height" type="number" min="1" onInput="board.resize()" placeholder="height" style="width:50px"></input>
<input id="speed" type="range" min="0" max="5" value="1" step="0.1" onInput="board.updateSpeed()"></input>
<button id="animate" type="button" onclick="board.animate()">animate</button>
<button id="stop" type="button" onclick="board.stop()">stop</button>
<button id="step" type="button" onclick="board.step()">step</button>
<button id="unstep" type="button" onclick="board.unstep()">unstep</button>
generation <span id="generations">0</span>
<script src="./Game/LifeGame.js"></script>
<script src="./Game/Board.js"></script>
<script id="runScript" src="./script.js"></script>
</body>
</html>