-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (73 loc) · 3.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Conway</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
<script src="./fa/js/all.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="flex-div">
<div class="information">
<div class="header">
<h3>Conway's Game of Life</h3>
<span id="open-btn"><i class="fas fa-times-circle"></i></span>
</div>
<div class="content">
<p>
Conway's game of life is a cellular automata simulation that follows four basic rules:
</p>
<ul>
<li>If a cell is alive then:
<ul>
<li>A cell with 0 or 1 neighbors dies of loneliness (Everyone needs a friend)</li>
<li>A cell with 2 or 3 neighbors thrives for another generation (The Goldilock's zone)</li>
<li>A cell with 4 or more neighbors dies of overpopulation (Too many friends can strain anyone)</li>
</ul>
</li>
<li>However, if a cell is dead and has exactly 3 neighbors, it comes back to life (The miracle of life)</li>
</ul>
<p>
To know more about Conwy's game of life, visit their <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">wiki</a>
</p>
</div>
</div>
<div class="menu" id="menu">
<div class="header">
<h3>Conway's Game of Life</h3>
<span id="close-btn"><i class="fas fa-question-circle"></i></span>
</div>
<div class="content">
<div class="info-group">
<label for="iterrations">Generation duration: </label>
<div class="iteration-speed">
<span>10ms</span>
<input type="range" id="speed-input" min="10" max="200" step="1" value="100">
<span>200ms</span>
</div>
</div>
<div class="info-group">
<label for="iterrations">Generation: </label>
<span id="itr-num-span">0</span>
</div>
<div class="btn-group">
<button class="btn" id="start-pause-btn">Start</button>
<button class="btn" id="clear-btn">Clear</button>
</div>
<div class="btn-group">
<button class="btn" id="random-btn">Random</button>
<button class="btn" id="step-btn">Step</button>
</div>
</div>
</div>
<div class="app" id="app">
</div>
</div>
<script src="main.js" type="module"></script>
</body>
</html>