-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (95 loc) · 2.92 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
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Gorillas</title>
<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
</head>
<body>
<canvas id="game"></canvas>
<svg width="200" height="250" id="windmill">
<defs>
<path id="arm" d="M -7 -20 C -7 -10 7 -10 7 -20 L 2 -80 L -2 -80" />
</defs>
<g transform="translate(100, 100)">
<g id="windmill-head">
<circle r="8"></circle>
<use href="#arm" />
<use href="#arm" transform="rotate(+120)" />
<use href="#arm" transform="rotate(-120)" />
</g>
</g>
<path
transform="translate(100, 0)"
d="M -7 250 L 7 250 L 3 115 L -3 115"
></path>
</svg>
<div id="wind-info">Wind Speed: <span id="wind-speed">0</span></div>
<div id="info-left">
<h3><span class="name">Player</span></h3>
<p>Angle: <span class="angle">0</span>°</p>
<p>Velocity: <span class="velocity">0</span></p>
</div>
<div id="info-right">
<h3><span class="name">Computer</span></h3>
<p>Angle: <span class="angle">0</span>°</p>
<p>Velocity: <span class="velocity">0</span></p>
</div>
<div id="instructions">
<h3 id="game-mode">Player vs. Computer</h3>
<h1>Drag the bomb to aim!</h1>
</div>
<div id="bomb-grab-area"></div>
<div id="congratulations">
<h1><span id="winner">?</span> won!</h1>
<p>
Game ended
</p>
<div class="dropdown">
<button class="dropbtn">New Game</button>
<div class="dropdown-content">
<a href="#" class="single-player">Single Player</a>
<a href="#" class="two-players">Two-Player</a>
<a href="#" class="auto-play">Autoplay</a>
</div>
</div>
</div>
<div id="settings">
<div class="dropdown">
<button class="dropbtn">New Game</button>
<div class="dropdown-content">
<a href="#" class="single-player">Single Player</a>
<a href="#" class="two-players">Two-Players</a>
<a href="#" class="auto-play">Autoplay</a>
</div>
</div>
<button id="color-mode">Dark Mode</button>
<button id="fullscreen" onclick="toggleFullscreen()">
<svg width="30" height="30">
<path
id="enter-fullscreen"
stroke="white"
stroke-width="3"
fill="none"
d="
M 10, 2 L 2,2 L 2, 10
M 20, 2 L 28,2 L 28, 10
M 28, 20 L 28,28 L 20, 28
M 10, 28 L 2,28 L 2, 20"
/>
<path
id="exit-fullscreen"
stroke="transparent"
stroke-width="3"
fill="none"
d="
M 10, 2 L 10,10 L 2, 10
M 20, 2 L 20,10 L 28, 10
M 28, 20 L 20,20 L 20, 28
M 10, 28 L 10,20 L 2, 20"
/>
</svg>
</button>
</body>
</html>