forked from chandyego84/hackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
101 lines (98 loc) · 2.92 KB
/
index.html
File metadata and controls
101 lines (98 loc) · 2.92 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="Style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="title_container">
<h1 class="title">Cliff Jumpers</h1>
</div>
<div class="wheel">
<div class="sa" id="sa">
<div class="sa1">
<span class="spa"><strong>Game1</strong></span>
<span class="spb"><strong>Game2</strong></span>
<span class="spc"><strong>Game3</strong></span>
<span class="spd"><strong>Game4</strong></span>
</div>
<div class="sa2">
<span class="spa"><strong>Game1</strong></span>
<span class="spb"><strong>Game2</strong></span>
<span class="spc"><strong>Game3</strong></span>
<span class="spd"><strong>Game4</strong></span>
</div>
</div>
</div>
<!--!>
<button class="rotatewheel" onclick="magicWheel()">
SPIN ME
</button>
<!-->
<button class="rotatewheel" onclick="magicWheel()">
SPIN ME</button>
<div class="button_container">
<div class="button_center">
<button onclick="window.location.href='Html/connect_four.html';" class="connect_four">Connect Four</button>
<button onclick="window.location.href='Html/tic_tac_toe.html';" class="tic_tac_toe">TicTacToe</button>
<button onclick="window.location.href='Html/radar.html';" class="radar">Radar</button>
<button onclick="window.location.href='Html/snakes.html';" class="snakes">Snakes</button>
<button onclick="window.location.href='Html/pong.html';" class="pong">Pong</button>
</div>
</div>
<!--
<button disabled="true" id="random_game" onClick="selectGame(dgre)">Test</button>
-->
<script>
var dgre;
function magicWheel(){
var x = 360;
var b = 3600;
dgre = Math.floor(Math.random()*(x-b)+b);
document.getElementById('sa').style.transform="rotate("+dgre+"deg)";
setTimeout(selectGame, 6000);
//var button = document.getElementById("random_game");
//button.disabled = false; // re-enable button use
}
function selectGame()
{
var game = dgre % 360;
if(game <= 22.5)
{
window.location.href = "Html/connect_four.html";
}
else if(game <= 90)
{
window.location.href = "Html/pong.html";
}
else if(game <= 135)
{
window.location.href = "Html/radar.html";
}
else if (game <= 180)
{
window.location.href = "Html/radar.html"; //snakes
}
else if (game <= 225)
{
window.location.href = "Html/snakes.html";
}
else if (game <= 270)
{
window.location.href = "Html/tic_tac_toe.html"; // red snakes
}
else if (game < 315)
{
window.location.href = "Html/tic_tac_toe.html";
}
else
{
window.location.href = "Html/connect_four.html";
}
}
</script>
<noscript>Please enable javascript</noscript>
</body>
</html>