-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (85 loc) · 2.7 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
94
95
96
97
98
99
100
101
102
103
104
105
<html>
<head>
<title> Text Adventure Game </title>
<link rel="stylesheet" href="prettyStuff.css">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
background_switch = null;
hideGame = null;
showGame = null;
hideMove = null;
showMove = null;
$(document).ready(function(){
var header = $('body');
var gamesegment = $('.game');
var movesegment = $('.compassholder');
var backgrounds = new Array(
'url(fields.jpg)'
, 'url(forest.jpg)'
, 'url(mountain.jpg)'
);
var current = 0;
function nextBackground(i) {
//current++;
//current = current % backgrounds.length;
header.css('background-image', backgrounds[i]);
}
//setInterval(nextBackground, 1000);
background_switch = nextBackground;
function hideGameSection(){
gamesegment.css('display', "none");
}
hideGame = hideGameSection;
function showGameSection(){
gamesegment.css('display', "block");
}
showGame = showGameSection;
function hideMoveSection(){
movesegment.css('display', "none");
}
hideMove = hideMoveSection;
function showMoveSection(){
movesegment.css('display', "block");
}
showMove = showMoveSection;
header.css('background-image', backgrounds[0]);
});
</script>
</head>
<body>
<div class="banner">
<h1> Welcome to the Wilderness </h1>
<p> You woke up in the middle of a mysterious field, your goal is to get out. </p>
<div class="game">
<h1> Combat </h1>
<p id = "enemyhealth">
Enemy Health:
</p>
<p id = "playerhealth">
Player Health:
</p>
<p id = "question">
Question:
</p>
<input id = "answer" class="input"><br>
<button id = "submit" class="compass"onclick="submit()">Submit</button>
<p id = "damagedealt">
Damage Dealt:
</p>
<p id = "timetaken">
Time Taken:
</p>
</div>
<div class="compassholder">
<button id="north"class="compass"onclick="northButtonClick()">North</button><br>
<button id="west" class="compass"onclick="westButtonClick()">West</button>
<button id="east" class="compass"onclick="eastButtonClick()">East</button><br>
<button id="south"class="compass"onclick="southButtonClick()">South</button>
</div>
<div class="leave">
<button id="quit" class="compass"onclick="quit()">Quit</button>
<header class="mainHeader"></header>
</div>
<script src="TheGoonFighters.js"></script>
</body>
</html>