-
Notifications
You must be signed in to change notification settings - Fork 34
/
index.html
93 lines (86 loc) · 3.28 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
<!DOCTYPE html>
<html>
<head>
<title>snek</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/index.css">
<link href="https://fonts.googleapis.com/css?family=Overpass+Mono" rel="stylesheet">
</head>
<body>
<div id="modal" class="modal">
<div class="modal-content">
<span class="close" onClick="closeModal()">×</span>
<p id="message-modal" class="message-modal"></p>
</div>
</div>
<div class="container">
<img src="https://i.imgur.com/j95GpFY.png" class="logo" />
<div id="game">
<p class="subtitle">Spacebar to start. Arrow keys to steer. Eat the tiny tomatoes but don't run into the walls or yourself.</p>
<br>
<div class="canvas-container">
<canvas id="canvas"></canvas>
<span id="error"></span>
<div class="game-timer"></div>
</div>
<p class='out-text'><span id='out'>welcome to snek!</span></p>
<button id="btn-restart" class="hide" onClick="location.reload()">Restart</button>
<p class="subtitle">Top Scores</p>
<center>
<table id="costumTable">
<thead>
<th>Nr</th>
<th>Username</th>
<th>Scores</th>
</thead>
<tbody id="scores">
</tbody>
</table>
</center>
</div>
<div id="getname">
<center>
<form id="nameform">
<p class="subtitle game-mode">Select player mode.</p>
<div>
<input id="singleplayer" name="playerMode" type="radio" value="singleplayer" checked="checked">
<label for="singleplayer">Single Player</label>
<input id="multiplayer" name="playerMode" type="radio" value="multiplayer">
<label for="multiplayer">Multiplayer (vs. bot)</label>
</div>
<p class="subtitle snek-color">Select your snek's color.</p>
<div>
<input id="red" name="playerColor" type="radio" value="red">
<label for="red">Red <img src="images/snek_head_red.png"></label>
<input id="blue" name="playerColor" type="radio" value="blue">
<label for="blue">Blue <img src="images/snek_head_blue.png"></label>
<input id="yellow" name="playerColor" type="radio" value="yellow">
<label for="yellow">Yellow <img src="images/snek_head_yellow.png"></label>
<input id="brown" name="playerColor" type="radio" value="brown" checked="checked">
<label for="brown">Brown <img src="images/snek_head_brown.png"></label>
</div>
<p class="subtitle game-mode">Select game mode.</p>
<div>
<input id="stamina" name="gameMode" type="radio" value="stamina" checked="checked">
<label for="stamina">Stamina</label>
<input id="longestWins" name="gameMode" type="radio" value="longest_wins">
<label for="longestWins">Longest wins</label>
</div>
<p class="subtitle board-size">Select board size.</p>
<select name="resolution" id="resolution">
</select><br>
<p class="subtitle username">Enter your name.</p>
<div>
<input id="username" name="playerName" placeholder="username" maxlength="10">
<button id="btn-start" type="submit" >Play</button>
</div>
</form>
</center>
</div>
</div>
<script src="scripts/Snek.js"></script>
<script src="scripts/Timer.js"></script>
<script src="scripts/game.js"></script>
</body>
</html>