-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
99 lines (92 loc) · 2.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
<!DOCTYPE html>
<html>
<head>
<title>
Game of Life
</title>
</head>
<style>
#gameCanvas{
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}
.container {
width: max-content;
padding:10px;
position: absolute;
left:50%;
transform: translateX(-50%);
z-index: 100;
text-transform: capitalize;
text-align: center;
border: 3px solid green;
background-color: white;
}
.instructions {
width: max-content;
padding: 10px;
position: absolute;
top: 40%;
right: 2%;
z-index: 100;
text-transform: capitalize;
text-align: center;
border: 3px solid green;
background-color: white;
}
.credits {
width: max-content;
padding: 10px;
position: absolute;
bottom: 3%;
left: 50%;
z-index: 100;
text-transform: capitalize;
text-align: center;
transform: translateX(-50%);
border: 3px solid green;
background-color: white;
font-size: 15px;
}
</style>
<body>
<div class="container">
<h3> Conway's Game of Life </h3>
<button onclick="togglePause()">Pause/play</button>
<button onclick="fullscreen()">Fullscreen</button>
<button onclick="clearscr()">Clear</button>
<button onclick="drawRandom()">Random</button>
<select id="draw">
<option value="Dot" selected="selected">draw dot</option>
<option value="Glider">draw glider</option>
<option value="LWSS">draw LWSS</option>
</select>
<!----
<button onclick="drawCellMouse()"> Draw </button>
----->
</div>
<div class="instructions">
<h4> Instructions</h4>
<ul>
<li>Press space to pause / unpause</li>
<li>Click / drag mouse to draw cells</li>
</ul>
<p style="color:green; font-size: 15px">Best experienced on Desktop</p>
</div>
<div class="credits">
<a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway's Game of Life</a>
<br>
<a href="https://github.com/manig1729/game-of-life-js#readme">About our implementation</a>
<br>
Contributors :
<a href="https://github.com/manig1729">Mani</a>
<a href="https://github.com/NeoIsRecursive">Neo</a>
<a href="https://github.com/Prashanthsrn">Prashanth</a>
<a href="https://github.com/p0wp0wpanda">Atharva</a>
</div>
</body>
<canvas id='gameCanvas' width='600' height='600'></canvas>
<script src='main.js'></script>
</html>