-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
36 lines (31 loc) · 1.11 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ping Pong Game</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="menu" class="menu">
<h1>Ping Pong Game</h1>
<p>Select Game Mode:</p>
<button onclick="selectMode('human-ai')">Human vs AI</button>
<button onclick="selectMode('player-player')">Player vs Player</button>
</div>
<div id="settings" class="menu" style="display: none;">
<h1>Game Settings</h1>
<p>Select Match Type:</p>
<button onclick="startGame(1)">First of 1</button>
<button onclick="startGame(3)">First of 3</button>
<button onclick="startGame(5)">First of 5</button>
</div>
<canvas id="pong" width="800" height="500" style="display: none;"></canvas>
<div id="game-over" class="menu" style="display: none;">
<h1>Game Over</h1>
<p id="winner"></p>
<button onclick="resetGame()">Play Again</button>
</div>
<script src="script.js"></script>
</body>
</html>