-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (36 loc) · 1.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Game of Life</title>
</head>
<body>
<input type="button" value="random" onclick="randomBoard();" />
<input type="button" value="start" onclick="startGenerations();" />
<input type="button" value="stop" onclick="stopGenerations();" />
<input type="button" value="step" onclick="stepGeneration();" />
<input type="button" value="clear" onclick="clearBoard();" />
<span id="fps"> | Javascript has not been loaded.</span>
<hr>
<canvas
onmouseup="mouseupevent(event)"
onmousedown="mousedownevent(event)"
onmousemove="mousemovement(event)"
id="myCanvas"
width="800"
height="800"
style="border:1px solid #000000;"
> </canvas>
<hr>
<h2>Game of Life Rules</h2>
<ul>
<li>A live cell dies if it has fewer than two live neighbors.</li>
<li>A live cell with two or three live neighbors lives on to the next generation.</li>
<li>A live cell with more than three live neighbors dies.</li>
<li>A dead cell will be brought back to live if it has exactly three live neighbors.</li>
</ul>
<script src="js/handler.js"></script>
</body>
</html>