-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (66 loc) · 1.9 KB
/
Copy pathindex.html
File metadata and controls
70 lines (66 loc) · 1.9 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Snake P2P</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="lobby">
<div class="lb-inner">
<h1>SNAKE<span>P2P</span></h1>
<p id="status"></p>
<button id="btn-find" disabled></button>
<div id="searching" class="hidden">
<div class="spinner"></div>
<p id="txt-searching"></p>
<div id="conn-log"></div>
</div>
</div>
</div>
<div id="game-screen" class="hidden">
<div id="hud">
<div class="hud-player p1">
<span class="hud-label" id="lbl-you"></span>
<span class="hud-score" id="score-p1">0</span>
</div>
<div class="hud-center">
<span id="sync-status">●</span>
</div>
<div class="hud-player p2">
<span class="hud-score" id="score-p2">0</span>
<span class="hud-label" id="lbl-rival"></span>
</div>
</div>
<div id="canvas-wrap">
<canvas id="cv"></canvas>
</div>
<div id="dpad">
<div id="dpad-grid">
<div></div>
<button class="dp" data-dir="up">▲</button>
<div></div>
<button class="dp" data-dir="left">◀</button>
<div class="dp-center"></div>
<button class="dp" data-dir="right">▶</button>
<div></div>
<button class="dp" data-dir="down">▼</button>
<div></div>
</div>
<div id="voice-btns">
<button id="btn-mute-self" class="vbtn">🎤</button>
<button id="btn-mute-peer" class="vbtn">🔊</button>
</div>
</div>
</div>
<div id="gameover" class="hidden">
<div class="go-inner">
<h2 id="go-title"></h2>
<p id="go-msg"></p>
<button id="btn-replay"></button>
</div>
</div>
<script type="module" src="game.js"></script>
</body>
</html>