-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
57 lines (52 loc) · 1.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Snake</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<style>
#gameScreen {
display: none;
}
</style>
</head>
<body>
<section class="vh-100">
<div class="container h-100">
<div id="initialScreen" class="h-100">
<div
class="d-flex flex-column align-items-center justify-content-center h-100"
>
<h1>Multiplayer Snake</h1>
<button type="submit" class="btn btn-success" id="newGameButton">Create New Game</button>
<div>OR</div>
<div class="form-group">
<input type="text" placeholder="Enter Game Code" id="gameCodeInput">
</div>
<button type="submit" class="btn btn-success" id="joinGameButton">Join Game</button>
</div>
</div>
<div id="gameScreen" class="h-100">
<div
class="d-flex flex-column align-items-center justify-content-center h-100"
>
<h1>Your game code is: <span id="gameCodeDisplay"></span></h1>
<canvas id="canvas"></canvas>
</div>
</div>
</div>
</section>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"
integrity="sha512-v8ng/uGxkge3d1IJuEo6dJP8JViyvms0cly9pnbfRxT6/31c3dRWxIiwGnMSWwZjHKOuY3EVmijs7k1jz/9bLA=="
crossorigin="anonymous"
></script>
<script src="index.js"></script>
</body>
</html>