-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
37 lines (37 loc) · 1.2 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="container">
<h1>Life</h1>
<form>
<pre class="form-control" id="editor">
Life = {
/*
The rules
https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
https://ru.wikipedia.org/wiki/%D0%96%D0%B8%D0%B7%D0%BD%D1%8C_(%D0%B8%D0%B3%D1%80%D0%B0)
1. Any live cell with less than two live neighbours dies, as if caused by under-population.
2. Any live cell with two or three live neighbours lives on to the next generation.
3. Any live cell with more than three live neighbours dies, as if by overcrowding.
4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
*/
step: function(map, iteration) {
return map;
}
};
</pre>
<button id="run" class="btn">Run</button>
<button id="stop" class="btn">Stop</button>
</form>
<div id="output"></div>
</div>
<script src="bower_components/ace-builds/src/ace.js"></script>
<script src="main.js"></script>
</body>
</html>