-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (62 loc) · 2.24 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
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html>
<head>
<title>Game of Life</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' href='css/bootstrap.css' type='text/css' media='all'>
<link rel = "stylesheet" href="css/style.css">
<meta charset="utf-8">
<script src="js/jquery-2.1.1.js"></script>
<script src="js/scripts.js"></script>
</head>
<body>
<div class="container">
<h1>Game of Life</h1>
<div class="row">
<div class="scale col-md-5 col-sm-7">
<div class="control-group">
<legend>Scale</legend>
<form class="form-inline">
<input type="number" id="gridWidth" class="number form-control" placeholder="20">
<span>X</span>
<input type="number" id="gridHeight" class="number form-control" placeholder="15">
<button id = "set" type="submit" class="btn btn-default">Set</button>
</form>
</div>
<div class="generation-counter text-right">
Generation: <span class="generation-counter">0</span>
</div>
</div>
</div>
<div class="row">
<div class="grid col-md-5 col-sm-7">
<canvas id = "grid" width="" height="">
</canvas>
</div>
<div class="info col-md-5 col-sm-5">
<p>
<strong>Rules for Game of Life:</strong>
</br>
</br>Any live cell with fewer than two neighbors dies of loneliness.
</br>Any live cell with more than three neighbors dies of crowding.
</br>Any dead cell with exactly three neighbors comes to life.
</br>Any live cell with two or three neighbors lives, unchanged, to the next generation.
</br>
</br> Read more about Game of Life in <a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Wikipedia</a>.
</p>
</div>
</div>
<div class="row">
<div class="controls col-md-6 form-group">
<form id = controls">
<button id="reset" type="submit" class="btn btn-danger">Reset</button>
<button id="step" type="submit" class="btn btn-primary">Step</button>
<button id="auto" type="button" class="btn btn-success">Auto</button>
<button id="forms" type="submit" class="btn btn-warning">Interesting forms</button>
<button id="info" type="submit" class="btn btn-info">Info</button>
</form>
</div>
</div>
</div>
</body>
</html>