-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (35 loc) · 1.45 KB
/
index.html
File metadata and controls
41 lines (35 loc) · 1.45 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" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Tic-Tac-Toe</title>
<!-- PyScript runtime -->
<link rel="stylesheet"
href="https://pyscript.net/releases/2024.5.1/core.css" />
<script type="module"
src="https://pyscript.net/releases/2024.5.1/core.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<section>
<h1 class="game--title">Tic Tac Toe</h1>
<!-- Mode selector -->
<div class="mode">
<label><input type="radio" name="mode" value="pvp" checked /> Player vs Player</label>
<label><input type="radio" name="mode" value="ai" /> Player vs Computer</label>
</div>
<!-- 3 × 3 board -->
<div class="game--container" id="board">
<!-- nine empty cells -->
<div class="cell" data-idx="0"></div><div class="cell" data-idx="1"></div><div class="cell" data-idx="2"></div>
<div class="cell" data-idx="3"></div><div class="cell" data-idx="4"></div><div class="cell" data-idx="5"></div>
<div class="cell" data-idx="6"></div><div class="cell" data-idx="7"></div><div class="cell" data-idx="8"></div>
</div>
<h3 id="status" class="game--status">Player X's turn</h3>
<button id="reset" class="game--restart">Restart Game</button>
</section>
<!-- Python logic -->
<py-script src="game.py"></py-script>
</body>
</html>