-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (47 loc) · 1.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Conway's Game of Life</title>
<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
</head>
<body>
<h1>Conway's Game of Life</h1>
<div class="rules">
<ul>
<li>
Any live cell with fewer than two live neighbors dies
(underpopulation)
</li>
<li>
Any live cell with two or three live neighbors lives on to
the next generation
</li>
<li>
Any live cell with more than three live neighbors dies
(overpopulation)
</li>
<li>
Any dead cell with exactly three live neighbors becomes a
live cell (reproduction)
</li>
<br />
<li>
Click on the canvas to select initial live cells, then press
'Start' to watch the patterns evolve according to the rules.
</li>
</ul>
</div>
<div class="container">
<canvas id="gameCanvas"></canvas>
</div>
<div class="controls">
<button id="startBtn">Start</button>
<button id="randomizeBtn">Random</button>
<button id="stopBtn">Stop</button>
<button id="clearBtn">Clear</button>
</div>
</body>
</html>