-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.html
78 lines (67 loc) · 2.65 KB
/
game.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>game_of_life</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id='ui'>
<div class='frame'>
<button id='oneframeBTN'>+ 1 frame</button>  
<button id='pauseBTN'>pause</button>  
<button id='resumeBTN'>resume</button>  
<button id='resetBTN'>reset</button>        
<a href="#" id='minimizeBTN'>[-]</a>
</div>
<div id='ui2'>
<div title='min-dist = minimum distance to draw vector'>
<input id='mindDistSLDR' type="range" min='5' max='300' step='1'>
<br>
<div class='small'>Minimum distance to draw vector</div>
</div>
<br>
<div title='starting particle count'>
<input id='startingParticleCountSLDR' type="range" min='0' max='2000' step='1'>
<br>
<div class='small'>starting Particles number (reset to apply)</div>
</div>
<br>
<div>
<input id='maxVelocitySLDR' type="range" min='0' max='30' step='1'>
<br>
<div class='small'>speed = from 0 to this value (reset to apply)</div>
</div>
<br>
<div>
<input id='expandDividerSLDR' type="range" min='0' max='5' step='0.1'>
<br>
<div class='small'>offspring spawn distance (lower = further)</div>
</div>
<br>
<div>RULES
<div id='rules'>
<input type="text" id='rulesINPT1'> connections or less = death <br>
<input type="text" id='rulesINPT2'> connections = new adjacent Particle <br>
<input type="text" id='rulesINPT22'> connections = new adjacent Particle <br>
<input type="text" id='rulesINPT3'> connections or more = death <br>
</div>
</div>
<br>
<div class='small'>(reset to apply)</div>
<br>
<div>STATS
<div id='stats'>
<div>dead from overcrowding <span id='stats1'>0</span></div>
<div>dead from isolation <span id='stats2'>0</span></div>
<div>particle count <span id='stats3'>0</span></div>
</div>
<br>
</div>
<a href="https://github.com/olivierrr/game-of-life">github</a>
</div>
</div>
<canvas id='game'></canvas>
<script type="text/javascript" src="index.js"></script>
</body>
</html>