-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
139 lines (137 loc) · 7.75 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta charset="UTF-8">
<meta name=”description” content="A JavaScript version of Conway's Game of Life, a 'cellular automaton' invented by Cambridge mathematician John Conway."/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Ellie Nguyen">
<meta property="og:site_name" content="Conway's Game of Life - Ellie Nguyen"/>
<meta property="og:image" content="https://scontent-atl3-1.xx.fbcdn.net/v/t31.0-8/15723661_1534358443246349_5451002159342390585_o.jpg?oh=ee7ef197bf0e79ca2261afdee681d6a1&oe=596464F1">
<meta property="og:description" content="A JavaScript version of Conway's Game of Life, a 'cellular automaton' invented by Cambridge mathematician John Conway."/>
<meta property="og:image" content="https://cdn.tutsplus.com/gamedev/authors/legacy/Stephane%20Beniak/2012/09/11/Preview_Image.png">
<meta property="og:url" content="http://ellienguyen.github.io/conway-game">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
<link href="style.css" rel="stylesheet">
<title>Conway's Game of Life - Ellie Nguyen</title>
</head>
<body>
<nav class="navbar navbar-inverse">
<a class="navbar-brand" href="http://web.stanford.edu/~cdebs/GameOfLife/">
Conway's Game of Life
</a>
</nav>
<div class="container">
<div class="row main-content">
<div class="col-md-8">
<div class="canvas-wrapper">
<canvas width="100" height="100" id = "respondCanvas">
</canvas>
</div>
</div>
<div class="col-md-4">
<div class="btn-group-vertical" role="group" aria-label="Control button group">
<button type="button" class="btn btn-primary" id = "play">
<i class="fa fa-play" aria-hidden="true"></i>
</button>
<button type="button" class="btn btn-danger" id = "pause">
<i class="fa fa-pause" aria-hidden="true"></i>
</button>
<button type="button" class="btn btn-success" id = "step-forward">
<i class="fa fa-step-forward" aria-hidden="true"></i>
</button>
<button type="button" class="btn btn-warning" id = "refresh">
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
<!--<button type="button" class="btn btn-secondary" id = "add-new">-->
<!--Add New-->
<!--</button>-->
</div>
<div class="slider">
<label for ="speed"><i class="fa fa-tachometer" aria-hidden="true"></i></label>
<input id="speed" type="range" min="10" max="100" step="10"/>
</div>
<div class="card control-card">
<div class="card-header">
Pattern
</div>
<div class="card-block">
<div class="form-group pattern-div">
<!--<label for="pattern-select"><h5>Pattern</h5></label>-->
<select class="form-control" id="pattern-select">
<option value = "none" >None</option>
<option value = "glider">Glider</option>
<option value = "spaceship">Lightweight Spaceship</option>
<option value = "gun">Gosper Glider Gun</option>
<option value = "pulsar">Pulsar</option>
<option value = "row">10 Cell Row</option>
<option value = "random">Random</option>
</select>
</div>
</div>
<div class="card-header">
Running information
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item" id = "generation">Generation: 0</li>
<li class="list-group-item" id = "live-cells">Live cells: 0</li>
</ul>
</div>
<button type="button" class="btn btn-primary modal-button" data-toggle="modal" data-target="#more">
More information
</button>
<div class="modal fade" id="more" tabindex="-1" role="dialog" aria-labelledby="moreModal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row more-info-div">
<div class="col-md-10 offset-md-1">
<h4>The Rules</h4>
<h5>For a space that is 'populated'</h5>
<ul>
<li>Each cell with one or no neighbors dies, as if by solitude.</li>
<li>Each cell with four or more neighbors dies, as if by overpopulation.</li>
<li>Each cell with two or three neighbors survives</li>
</ul>
<h5>For a space that is 'empty'</h5>
<ul>
<li>Each cell with three neighbors becomes populated.</li>
</ul>
<h4>Source code</h4>
<a href="#">
<p>Github</p>
</a>
<h4>Further information</h4>
<a href="http://web.stanford.edu/~cdebs/GameOfLife/">
<p>Stanford University - Game of Life</p>
</a>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="script.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</html>