Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 58 additions & 33 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link
rel="icon"
href="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fwww.ranklogos.com%2Fwp-content%2Fuploads%2F2016%2F09%2FTic-Tac-Toe-Logo-RK1219.png&f=1&nofb=1"
/>
<link rel="stylesheet" href="style.css" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tic-Tac-Toe</title>
</head>
<body>
<h3 id="headline">Tic-Tac-Toe</h3>
<h2 class="player_turn">Player 1 Turn</h2>
<section>
<div onclick="func(this)" class="box one"></div>
<div onclick="func(this)" class="box two"></div>
<div onclick="func(this)" class="box three"></div>
<div onclick="func(this)" class="box four"></div>
<div onclick="func(this)" class="box five"></div>
<div onclick="func(this)" class="box six"></div>
<div onclick="func(this)" class="box seven"></div>
<div onclick="func(this)" class="box eight"></div>
<div onclick="func(this)" class="box nine"></div>
</section>
<button onclick="restart(false)" id="btn">Restart</button>
<head>
<link
rel="icon"
href="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fwww.ranklogos.com%2Fwp-content%2Fuploads%2F2016%2F09%2FTic-Tac-Toe-Logo-RK1219.png&f=1&nofb=1"
/>
<link rel="stylesheet" href="style.css" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tic-Tac-Toe</title>
</head>
<body>
<h3 id="headline">Tic-Tac-Toe</h3>
<br />

<div id="overlay">
<div id="overlay-display">
<p id="result">Result</p>
<button onclick="restart(true)" id="restart-btn">Restart</button>
</div>
</div>
</body>
<script src="index.js"></script>
<!-- Mode selection -->
<input
type="radio"
id="pvp"
name="mode"
value="pvp"
checked
onclick="mode='pvp'; restart(false)"
/>
<label for="pvp">Player vs Player</label>

<input
type="radio"
id="pvc"
name="mode"
value="pvc"
onclick="mode='pvc'; restart(false)"
/>
<label for="pvc">Player vs Computer</label>

<h2 class="player_turn">Player 1 Turn</h2>
<section id="board">
<div onclick="func(this)" class="box one"></div>
<div onclick="func(this)" class="box two"></div>
<div onclick="func(this)" class="box three"></div>
<div onclick="func(this)" class="box four"></div>
<div onclick="func(this)" class="box five"></div>
<div onclick="func(this)" class="box six"></div>
<div onclick="func(this)" class="box seven"></div>
<div onclick="func(this)" class="box eight"></div>
<div onclick="func(this)" class="box nine"></div>
</section>
<!-- Main board restart button -->
<button onclick="restart(false)" id="btn">Restart</button>

<!-- Popup overlay restart button -->
<div id="overlay">
<div id="overlay-display">
<p id="result">Result</p>
<button onclick="restart(true)" id="restart-btn">Restart</button>
</div>
</div>

</body>
<script src="index.js"></script>
</html>
Loading