-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
38 lines (37 loc) · 1.79 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
<!DOCTYPE HTML>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Anton|Cabin|Nobile|Sarabun|Yrsa&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div style="width: inherit;">
<div style="display:inline-block; width: 16%; margin: 0 9% 0 1%;">
<div style="display:inline-block;"><p>Computer Score:</p></div>
<div style="display:inline-block;" id="computerSide"></div>
</div>
<div style="display:inline-block; margin-left: 0 7%;">
<h3 style="visibility: hidden; display:inline-block;" id="winMessage">You won!</h3>
<h3 style="visibility: hidden; display:inline-block; padding-left: 10px; color:blue;" id="restartMessage">Refresh your browser to play again.</h3>
</div>
<div style="display:inline-block; width: 13%; margin-left: 9%">
<div style="display:inline-block;"><p>Player Score:</p></div>
<div style="display:inline-block;" id="playerSide"></div>
</div>
</div>
<canvas id="myCanvas" width="1000" height="610" style="border-style:solid #fff; background-color:black; margin-top:5px; display:block;"></canvas>
<div id="modalArea" class="modal">
<div class="modal-content">
<h2 id="magic-pong-header">Welcome to Magic Pong!</h2>
<p>
A modern take on the Classic Pong game, the rules are simple.<br />
You are in control of the right paddle. Simply press down on the up and down keys to move your paddle
and prevent the Computer paddle from scoring. Reach a score of 10 first to win the game.
</p>
<h5>Click the <strong>Start Button</strong> to start the game.</h5>
<button id="startGame">Start</button>
</div>
</div>
<script src="index.js"></script>
</body>
</html>