-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
80 lines (70 loc) · 2.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>BattleshipJS</title>
<link rel="stylesheet" href="src/battlestyles.css">
<link rel="icon" type="image/png" sizes="32x32" href="src/favicon-32x32.png">
</head>
<body>
<h1>
<span style="color: #24fcff">BattleshipJS</span>
</h1>
<img src="src/battleship_header.png"></img>
<div id="gameInfo">
<h2> PLAYER:
<span id="currentPlayer"></span></h2>
<h2> DIMENSION:
<span id="currentDimension"></span></h2>
<h2> MODE:
<span id="currentMode"></span></h2>
<div id="currentRoundWrapper">
<h2> ROUND:
<span id="currentRound"></span></h2>
</div>
</div>
<div id="boardSizeSelectionDiv" class="flex-container">
<div style="width:150px">Select board size: </div>
<div id="sizeSelectionContainer"></div>
</div>
<div id="gameShips">
<h2 style="width: 150px"> SHIPS </h2>
<form class="radiobuttons-container" id="ships"></form>
</div>
<div id="gameShipsDestroyedP0" style="display: none">
<h2 style="width: 150px"> SHIPS DESTROYED </h2>
<div id="shipsDestroyedP0"></div>
</div>
<div id="gameShipsDestroyedP1" style="display: none">
<h2 style="width: 150px"> SHIPS DESTROYED </h2>
<div id="shipsDestroyedP1"></div>
</div>
<div id="gameShipDirection">
<h2 style="width: 150px"> SHIP DIRECTION </h2>
<form class="radiobuttons-container-2" id="shipDirectionSelection">
<label for="horizontal">Horizontal</label>
<input onchange="updateDirection(this)" id="horizontal" checked="checked" type="radio" name="direction" value="horizontal" />
<label for="vertical">Vertical</label>
<input onchange="updateDirection(this)" id="vertical" type="radio" name="direction" value="vertical" />
</form>
<div id="shipSelected"></div>
</div>
<div id="gameNext" style="display:none">
<button id="next" onclick="nextShooter()">END TURN</button>
<i> (1. Press the cell to shoot, 2. End turn by pressing the button) </i>
</div>
<div id="gameOver" style="display:none">
<div id="gameOverWinningPlayer">
<h1>GAME IS OVER</h1>
</div>
<button value="Refresh Page" onClick="window.location.reload();">
PLAY AGAIN
</button>
</div>
<div id="containerP0"></div>
<div id="containerP1"></div>
<script src="src/battlescript.js"></script>
</body>
</html>