-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (72 loc) · 3.05 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>T++</title>
<link rel="shortcut icon" href="favicon.ico">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width,
initial-scale=1.0,
maximum-scale=1,
user-scalable=no,
minimal-ui">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="menu">
<h1>T++</h1>
<div class="menu-container">
<span>
<input id="private" type="radio" name="difficulty">
<label for="private">Private</label>
</span>
<span>
<input id="sergeant" type="radio" name="difficulty" checked="checked">
<label for="sergeant">Sergeant</label>
</span>
<span>
<input id="lieutenant" type="radio" name="difficulty">
<label for="lieutenant">Lieutenant</label>
</span>
<span>
<input id="colonel" type="radio" name="difficulty">
<label for="colonel">Colonel</label>
</span>
</div>
<div class="menu-container">
<span>
<input id="one-player" type="radio" name="count-players" checked="checked">
<label for="one-player">One player</label>
</span>
<span>
<input id="two-players" type="radio" name="count-players">
<label for="two-players">Two players</label>
</span>
</div>
<div class="menu-container">
<div class="button -regular center" id="play-btn">Play</div>
<div class="button -regular center" id="play-bench">Benchmark</div>
</div>
</div>
<script type="text/javascript">
var twoplayers = "false";
document.getElementById("one-player").onclick = function() { twoplayers = "false"; };
document.getElementById("two-players").onclick = function() { twoplayers = "true"; };
var difficulty = 3;
document.getElementById("private").onclick = function() { difficulty = 0; };
document.getElementById("sergeant").onclick = function() { difficulty = 3; };
document.getElementById("lieutenant").onclick = function() { difficulty = 7; };
document.getElementById("colonel").onclick = function() { difficulty = 10; };
document.getElementById("play-btn").onclick = function() {
window.location.href += "game?mode=level&difficulty=" + difficulty + "&twoplayers=" + twoplayers;
};
document.getElementById("play-bench").onclick = function() {
window.location.href += "game?mode=bench&difficulty=15&twoplayers=true";
};
</script>
</body>
</html>