-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (68 loc) · 2.88 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TicTacToe</title>
<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=Pacifico&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body id="body">
<div class="blur hidden" id="blur">
<div class="popup">
<p class="popuptext" id="winnerText"></p>
<a class="btnok" onclick="closePopup()">OK!</a>
</div>
</div>
<div class="body">
<h1 class="gametitle"><span id="tic">TIC</span><span id="tac"> TAC</span><span id="toe"> TOE</span></h1>
<div id="modeSelection">
<div class="modeSelection">
<button class="button2 reset" onclick="startGame('PvP')">Player vs Player</button>
<button class="button2 clear" onclick="startGame('PvBot')">Player vs Bot</button>
</div>
</div>
<div class="container hidden" id="gameContainer">
<div class="row">
<div class="key" id="box1">
</div>
<div class="key" id="box2">
</div>
<div class="key" id="box3">
</div>
</div>
<div class="row">
<div class="key" id="box4">
</div>
<div class="key" id="box5">
</div>
<div class="key" id="box6">
</div>
</div>
<div class="row">
<div class="key" id="box7">
</div>
<div class="key" id="box8">
</div>
<div class="key" id="box9">
</div>
</div>
<div class="scorecontainer">
<p class="playerX">Player X</p>
<p class="score" id="result"> <span id="playerXscore">0</span>-<span id="playerOscore">0</span></p>
<p class="playerO">Player O</p>
</div>
<p class="tie">Tie: <span id="tieScore">0</span></p>
<div class="buttonContainer">
<button onclick="clearBoard()" class="button clear">Clear</button>
<button onclick="reset()" class="button reset">Reset</button>
<button onclick="selectMode()" class="button selectMode">Gamemode</button>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="script.js"></script>
</body>
</html>