-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
57 lines (50 loc) · 1.58 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">
<title>MultiPlayer Snake</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" 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"></script>
<script src="index.js"></script>
</body>
</html>