-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
57 lines (53 loc) · 2.31 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="game-style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap"
rel="stylesheet">
<title>Tic Tac Toe</title>
</head>
<body>
<h1>TIC TAC TOE</h1>
<div class="score-board">
<div class="left-score">
<div class="x-score">X</div>
<div id="js-x-score" class="x-score">-</div>
</div>
<div class="right-score">
<div class="o-score">O</div>
<div id="js-o-score" class="o-score">-</div>
</div>
<div id="reset-score" class="reset-score">
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor"
class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z" />
<path
d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466" />
</svg>
</div>
</div>
<div id="display-turn" class="display-turn">
<p><b id="turn">X</b> turn</p>
</div>
<div class="game-body">
<div id="container" class="container">
<div id="00" class="box" onclick="playGame(0,0)"></div>
<div id="01" class="box" onclick="playGame(0,1)"></div>
<div id="02" class="box" onclick="playGame(0,2)"></div>
<div id="10" class="box" onclick="playGame(1,0)"></div>
<div id="11" class="box" onclick="playGame(1,1)"></div>
<div id="12" class="box" onclick="playGame(1,2)"></div>
<div id="20" class="box" onclick="playGame(2,0)"></div>
<div id="21" class="box" onclick="playGame(2,1)"></div>
<div id="22" class="box" onclick="playGame(2,2)"></div>
</div>
<div id="display-results"></div>
</div>
<div id="restart" class="restart">Restart Game</div>
<script src="functions.js"></script>
</body>
</html>