-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (33 loc) · 1.15 KB
/
index.html
File metadata and controls
41 lines (33 loc) · 1.15 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Tic Tac Toe Pro</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<h1>🎮 Tic Tac Toe</h1>
<div id="setup">
<input type="text" id="playerX" placeholder="Player X Name" />
<input type="text" id="playerO" placeholder="Player O Name" />
<button class="start-btn" onclick="startGame('2')">2 Player</button>
<button class="ai-btn" onclick="startGame('1')">Play vs AI</button>
</div>
<div id="game" style="display: none">
<div class="scoreboard">
<span id="nameX">Player X</span>: <span id="scoreX">0</span> |
<span id="nameO">Player O</span>: <span id="scoreO">0</span> | Game:
<span id="gameCount">1</span>/5
</div>
<div class="series-result" id="seriesResult">
First to 3 wins the series 🎯
</div>
<div class="board" id="board"></div>
<h3 id="status"></h3>
<button onclick="resetGame()">Restart</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>