-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (101 loc) · 4.79 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tic Tac Toe</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.png">
<script src="https://kit.fontawesome.com/b99f0b023f.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.4.0/dist/confetti.browser.min.js"></script>
</head>
<body>
<h1>Tic Tac Toe</h1>
<div class="main">
<div class="player-container">
<div class="info">
<i class="fas fa-circle"></i>
<div class="player-icon">X</div>
<div class="player-name"><i></i><span></span></div>
</div>
<div class="info">
<div class="player-score">Score: <span class="player-score-number">0</span></div>
<i class="fas fa-trophy"></i>
</div>
</div>
<div class="grid-container">
<div data-ind="0" class="grid-item"></div>
<div data-ind="1" class="grid-item"></div>
<div data-ind="2" class="grid-item"></div>
<div data-ind="3" class="grid-item"></div>
<div data-ind="4" class="grid-item"></div>
<div data-ind="5" class="grid-item"></div>
<div data-ind="6" class="grid-item"></div>
<div data-ind="7" class="grid-item"></div>
<div data-ind="8" class="grid-item"></div>
</div>
<div class="player-container">
<div class="info">
<i class="fas fa-circle"></i>
<div class="player-icon">O</div>
<div class="player-name"><i class="fas fa-robot fa-lg"></i><span></span></div>
</div>
<div class="info">
<div class="player-score">Score: <span class="player-score-number">0</span></div>
<i class="fas fa-trophy"></i>
</div>
</div>
</div>
<div class="button-container">
<button id="reset">Reset</button>
<button id="new-game">New Game</button>
<button class="fas fa-volume-up"></button>
</div>
<!--- Overlay -->
<div class="setup-overlay">
<div class="setup-container">
<h1>Tic Tac Toe</h1>
<button class="one-player-button">1 Player</button>
<button class="two-player-button">2 Players</button>
<form class="player-form">
<div class="length-select">
<div class="description-text game-length-text">Game Length</div>
<div class="radio-container">
<input type="radio" name="game-length" id="endless" value="endless" required checked>
<label title="Endless" for="endless">Endless</label>
<input type="radio" name="game-length" id="single" value="single">
<label title="Best of 1" for="single">Single</label>
<input type="radio" name="game-length" id="short" value="short">
<label title="Best of 3" for="short">Short</label>
<input type="radio" name="game-length" id="medium" value="medium">
<label title="Best of 7" for="medium">Medium</label>
<input type="radio" name="game-length" id="long" value="long">
<label title="Best of 13" for="long">Long</label>
</div>
</div>
<div class="player-input">
<input type="text" name="player-name" id="player-name-1" autocomplete="off" maxlength="40"
placeholder="Player 1">
<div class="versus-text">VS</div>
<input type="text" name="player-name" id="player-name-2" autocomplete="off" maxlength="40"
placeholder="Player 2">
</div>
<div>
<label for="ai-difficulty" class="description-text ai-description-text">AI Difficulty</label>
<select name="ai-difficulty" id="ai-difficulty">
<option value="easy">Easy</option>
<option value="medium">Medium</option>
<option value="impossible">Impossible</option>
</select>
</div>
<button class="start" type="submit">Start!</button>
</form>
</div>
</div>
<div class="win-overlay">
<h1 id="win-text">Player wins!</h1>
</div>
<script src="script.js"></script>
</body>
</html>