-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
81 lines (74 loc) · 3.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Battleships</title>
<link rel="stylesheet" href="./styles/style.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&display=swap');
</style>
</head>
<body>
<div class="final-message hidden">YOU WIN!</div>
<div class="welcome">
<h1>BATTLESHIPS</h1>
<h2>A GAME BY PAVEL POPOV</h2>
<p>
<br>THE RULES ARE SIMPLE: FIRST PLACE YOUR SHIPS ON YOUR PLAYING FIELD BY CLICKING
<br>ON THEIR NAMES AND THEN CLICKING ON THE CHOSEN TILE.
<br>AN AIRCRAFT CARRIER TAKES UP 5 TILES, BATTLECRUISERS TAKE UP 3 AND A BOAT - ONLY 1.
<br>AFTER YOU'VE PLACED YOUR SHIPS, IT'S TIME FOR THE GAME TO START!
<br>CLICK ON THE ENEMY'S TILES TO SHOOT AT THEM!
<br>GREEN MEANS YOU'VE SUCCESSFULLY HIT AN ENEMY SHIP.
<br>TO MAKE THINGS MORE INTERESTING, YOU HAVE TWO BONUSES AT HAND:
<br>A VOLLEY WILL CLEAR A WHOLE ROW OF THE ENEMY'S BOARD
<br>A CLUSTER BOMB WILL CLEAR A 3X3 SQUARE OF THE ENEMY'S BOARD AROUND THE TILE YOU CLICKED
<br>BUT BE AWARE, THE AI ALSO HAS ACCESS TO THESE BONUSES AND HE IS TRIGGER HAPPY!
<br>I HOPE YOU HAVE AS MUCH FUN PLAYING IT AS I HAD CODING IT
</p>
<h2>ENJOY!</h2>
</div>
<div class="game-container-wrapper hidden">
<div class="game-board">
<div class="message">
Gameplay messages
</div>
<div class="ship-holder">
<div class="cluster-enemy hidden">cluster: <span>1</span></div>
<div class="volley-enemy hidden">volley: <span>1</span></div>
<div class="cluster-player hidden">CLUSTER :<span>1</div>
<div class="volley-player hidden">VOLLEY :<span>1</span></div>
<div id="AC1">AIRCRAFT CARRIER</div>
<div id="AC2">AIRCRAFT CARRIER</div>
<div id="BC1">BATTLECRUISER</div>
<div id="BC2">BATTLECRUISER</div>
<div id="SH1">PATROL BOAT</div>
<div id="SH2">PATROL BOAT</div>
</div>
<div class="hit-messages">
<div class="enemy-msg"></div>
<div class="player-msg"></div>
</div>
<div class="scoreboard">
<h3>ENEMY SHIP TILES LEFT: <span id="enemy-ships"></span></h3>
<h3 class="rotate-sign">ROTATE SHIP</h3>
<h3>PLAYER SHIP TILES LEFT: <span id="player-ships"></span></h3>
</div>
</div>
<div class="game-container">
<div class="enemy-board board">
</div>
<div class="dividing-line">
<hr class="dividing-line">
</div>
<div class="player-board board">
</div>
</div>
</div>
<script type="module" src="./scripts/functions.js"></script>
<script type="module" src="./scripts/Board.js"></script>
<script type="module" src="./scripts/index.js"></script>
</body>
</html>