-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
195 lines (187 loc) · 9.04 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Battle Ships</title>
<!-- external librarys & assets -->
<script src="libs/jquery-3.4.0.min.js"></script>
<link rel="shortcut icon" href="battleship.png" type="image/png">
<link href="https://fonts.googleapis.com/css2?family=Righteous&display=swap" rel="stylesheet">
<!-- game -->
<link rel="stylesheet" href="css/battleships.css">
<link rel="stylesheet" href="css/start.css">
<link rel="stylesheet" href="css/setShips.css">
<link rel="stylesheet" href="css/set-help.css">
<link rel="stylesheet" href="css/board.css">
<link rel="stylesheet" href="css/battle.css">
<link rel="stylesheet" href="css/stats.css">
<!-- screen classes -->
<script src="js/screen-class.js"></script>
<script src="js/start-class.js"></script>
<script src="js/setShips-class.js"></script>
<script src="js/setHelp-class.js"></script>
<script src="js/battle-class.js"></script>
<script src="js/stats-class.js"></script>
<!-- game classes -->
<script src="js/assets-class.js"></script>
<script src="js/game-class.js"></script>
<script src="js/player-class.js"></script>
<script src="js/player-human-class.js"></script>
<script src="js/player-computer-class.js"></script>
<script src="js/ship-class.js"></script>
<!-- Interfaces classes -->
<script src="js/interface/interface-class.js"></script>
<script src="js/interface/progressbar-class.js"></script>
<script src="js/interface/board-class.js"></script>
<script src="js/interface/dockyard-class.js"></script>
<script src="js/interface/dockyard-en.js"></script>
</head>
<body>
<div id="loader">
BATTLE SHIPS
<div class="loader">loading...</div>
</div>
<div id="game" class="hidden">
<div id="start" class="screen hidden">
<div class="title">BATTLE<br>SHIPS<span>classic</span></div>
<div id="main-menu" class="menu">
<ul>
<li data-option="menu" data-menu="play-menu" class="selectable">Battle</li>
<li data-option="menu" data-menu="settings-menu" class="selectable">Settings</li>
</ul>
</div>
<div id="play-menu" class="menu hidden">
<ul>
<li>choice mode</li>
<li data-option="battle" data-mode="hvh" class="selectable">Human vs Human</li>
<li data-option="battle" data-mode="hvc" class="selectable">Human vs Computer</li>
<li data-option="menu" data-menu="main-menu" class="selectable">Back</li>
</ul>
</div>
<div id="settings-menu" class="menu hidden">
<ul>
<li>Settings</li>
<li data-option="option" data-set="boardSize" data-type="num" data-values="8,10,12,14,16,18,20"
class="selectable">
Board size<span class="set-value">10</span></li>
<li data-option="option" data-set="showSunkenShips" data-type="bool" data-values="off,on"
class="selectable">
Show sunken ships<span class="set-value">on</span>
</li>
<li data-option="option" data-set="allowObliqueArrangement" data-type="bool" data-values="off,on"
class="selectable">
Allow oblique arrangement of ships<span class="set-value">off</span>
</li>
<li data-option="option" data-set="distanceBetweenShips" data-type="bool" data-values="off,on"
class="selectable">
Observe the distance between ships<span class="set-value">off</span>
</li>
<li data-option="menu" data-menu="main-menu" class="selectable">Back</li>
</ul>
</div>
<button id="playMusic">MUSIC: OFF</button>
<button id="stopMusic" class="hidden">MUSIC: ON</button>
</div>
<div id="game-set" class="screen hidden">
<div class="title">BATTLESHIPS<span>Setup your ships</span></div>
<fieldset>
<legend>Dockyard</legend>
<div id="dockyard-list">
</div>
</fieldset>
<button id="abort">ABORT</button>
<input id="player-name" type="text" />
<button id="done">DONE</button>
<button id="battle">BATTLE</button>
<button id="help">HELP</button>
</div>
<div id="set-help" class="hidden">
<div id="help-dlg">
<h1>Before you panic...</h1>
<p>1. Select a ship from the "Dockyard" list</p>
<p>2. Rotate the ship, using RBM.</p>
<p>3. Set the selected ship on board (LBM)</p>
<p>That's all :)</p>
<button id="close">CLOSE</button>
</div>
</div>
<div id="battle" class="screen hidden">
<!-- <div class="title">BATTLESHIPS</div> -->
<div class="score"></div>
<!-- TO DO: Only for debbug computer-->
<button id="aim" class="hidden">AIM</button>
<button id="fire" class="hidden">FIRE</button>
<button id="chance-map" class="hidden">CHANCE MAP</button>
<!-- end debbug computer -->
<button id="surrender">SURRENDER</button>
<button id="stats">STATS</button>
<div id="turn" class="bigtext"><span></span><br>TURN</div>
<div id="fire" class="bigtext">FIRE</div>
<div id="miss" class="bigtext">MISS<br><span class="points"></span></div>
<div id="hit" class="bigtext">HIT<br><span class="points"></span></div>
<div id="hit-sink" class="bigtext">HIT & SINK<br><span class="points"></span></div>
<div id="gameover" class="bigtext">GAME<br>OVER</div>
<!-- <span class="bigtext"></span> -->
</div>
<div id="stats" class="screen hidden">
<div class="title">STATISTICS</div>
<div id="stats-dlg">
<ul>
<li id="you" class="tab">YOU</li>
<li id="opponent" class="tab">OPPONENT</li>
<!-- <li data-tabid="global">GLOBAL</LI> -->
</ul>
<!-- <h1>Global battle stats</h1> -->
<div id="you" class="tab">
<ul id="ships">
<li>
<h1>Fleet status</h1>
</li>
<li>
<p>Condition<span id="you-fleetCondition" class="stat">-</span></p>
</li>
<!-- <li class="title">Fleet status</li> -->
</ul>
<div id="player-stat">
<h1>Battle status</h1>
<p>Discovered ships<span id="you-discoveredShips" class="stat">-</span></p>
<p>Sunken ships<span id="you-sunkenShips" class="stat">-</span></p>
<p>Shots fired<span id="you-shots" class="stat">-</span></p>
<p>Hits<span id="you-hits" class="stat">-</span></p>
<p>Accuracy<span id="you-accuracy" class="stat">-</span></p>
</div>
</div>
<div id="opponent" class="tab">
<ul id="ships">
<li>
<h1>Fleet status</h1>
</li>
<li>
<p>Condition<span id="opponent-fleetCondition" class="stat">-</span></p>
</li>
<!-- <li class="title">Fleet status</li> -->
</ul>
<div id="player-stat">
<h1>Battle status</h1>
<p>Discovered ships<span id="opponent-discoveredShips" class="stat">-</span></p>
<p>Sunken ships<span id="opponent-sunkenShips" class="stat">-</span></p>
<p>Shots fired<span id="opponent-shots" class="stat">-</span></p>
<p>Hits<span id="opponent-hits" class="stat">-</span></p>
<p>Accuracy<span id="opponent-accuracy" class="stat">-</span></p>
</div>
</div>
<div id="global">
<h1>GLOBAL</h1>
<p>Battle time<span id="stat-duration" class="stat">-</span></p>
<p>Turns<span id="stat-turns" class="stat">-</span></p>
<p>Total shots<span id="stat-shots" class="stat">-</span></p>
</div>
<button id="close">CLOSE</button>
<button id="revange">REVANGE</button>
<button id="menu">MENU</button>
</div>
</div>
</div>
</body>
</html>