-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplay.html
56 lines (56 loc) · 2.53 KB
/
play.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=initial-scale=1.0">
<title>Conway's Game of Life</title>
<link rel="stylesheet" href="styles/default.css"></head>
<script src="https://kit.fontawesome.com/44caaaecfc.js" crossorigin="anonymous"></script>
<script src="app/game.js"></script>
<script src="app/world.js"></script>
<script src="app/logic.js"></script>
<script src="app/statistics.js"></script>
<script src="app/patterns.js"></script>
</head>
<body>
<div id="world"></div>
<div class="hud">
<div class="v-center-elements">
<div class="statistics">
<div class="v-center-elements">
<div class="box">
<span>Generation: <span id="generation">0</span></span>
<span>Population: <span id="population">0</span></span>
<span>Status: <span id="status">Unknown</span></span>
</div>
</div>
</div>
<div class="buttons">
<div class="v-center-elements">
<div class="box">
<button id="btn-auto" onclick="startAutoEv()">Auto-evolve <i class="fas fa-play"></i></button>
<button id="btn-evolve" onclick="evolve()">Evolve <i class="fas fa-step-forward"></i></button>
<button id="btn-reset" onclick="reset()">Reset <i class="fas fa-history"></i></button>
<button id="btn-clear" onclick="kill()">Clear <i class="fas fa-broom"></i></button>
<div class="dropdown">
<button id="btn-pattern">Patterns <i class="fas fa-angle-double-up"></i></button>
<div class="dropdown-content" id="list-pattern">
<a href="#" onclick="applyNestedFramePattern()">Nested frame</a>
<a href="#" onclick="applyRandomPattern()">Random</a>
</div>
</div>
</div>
</div>
</div>
<div class="slider">
<div class="v-center-elements">
<div class="box">
<span>Speed: <span id="speed">1.00</span></span>
<input type="range" id="sld-speed" min="25" max="400" value="200">
</div>
</div>
</div>
</div>
</div>
</body>
</html>