-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
157 lines (156 loc) · 8.57 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tic-Tac-Toe | The Odin Project</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Fredoka+One&family=Roboto&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script defer src="https://use.fontawesome.com/releases/v5.14.0/js/all.js"></script>
</head>
<body>
<main>
<header class="hero is-small is-primary">
<div class="hero-body">
<h1 class="title is-1">Tic-Tac-Toe</h1>
</div>
</header>
<section class="section">
<table id="gameboard">
<tr>
<td data-index='0'></td>
<td data-index='1'></td>
<td data-index='2'></td>
</tr>
<tr>
<td data-index='3'></td>
<td data-index='4'></td>
<td data-index='5'></td>
</tr>
<tr>
<td data-index='6'></td>
<td data-index='7'></td>
<td data-index='8'></td>
</tr>
</table>
<div class="block game-controls">
<button id="setup-game" class="button is-primary">Start Game</button>
<form id="settings">
<div class="field hide" data-group="player-selection">
<div class="control">
<label class="radio button is-link">
<input type="radio" name="players">
<i class="fas fa-user" aria-hidden="true"></i>
One Player
</label>
<label class="radio button is-link">
<input type="radio" name="players">
<i class="fas fa-user-friends" aria-hidden="true"></i>
Two Players
</label>
</div>
</div>
<div class="field hide" data-group="one-player">
<div class="block">
<label class="label">Name</label>
<div class="control">
<input class="input" type="text">
</div>
</div>
<div class="block">
<!-- <label class="label">Sign</label> -->
<div class="control">
<label class="radio button is-link">
<input type="radio" name="sign" value="X" checked>
<i aria-hidden="true" class="fas fa-times" title="Select X sign"></i>
<span class="sr-only">Select X sign</span>
</label>
<label class="radio button is-link">
<input type="radio" name="sign" value="O">
<i aria-hidden="true" class="far fa-circle" title="Select O sign"></i>
<span class="sr-only">Select O sign</span>
</label>
</div>
</div>
<button class="button is-primary start-game" disabled>Begin!</button>
</div>
<div class="field hide" data-group="two-players">
<div class="block">
<div class="block">
<h4 class="is-4 title">Player 1</h4>
<label class="label">Name</label>
<div class="control">
<input class="input" type="text">
</div>
</div>
<!-- <label class="label">Sign</label> -->
<div class="block">
<div class="control">
<label class="radio button is-link">
<input type="radio" name="1-sign" value="X" checked>
<i aria-hidden="true" class="fas fa-times" title="Select X sign"></i>
<span class="sr-only">Select X sign</span>
</label>
<label class="radio button is-link">
<input type="radio" name="1-sign" value="O">
<i aria-hidden="true" class="far fa-circle" title="Select O sign"></i>
<span class="sr-only">Select O sign</span>
</label>
</div>
</div>
</div>
<div class="block">
<div class="block">
<h4 class="is-4 title">Player 2</h4>
<label class="label">Name</label>
<div class="control">
<input class="input" type="text">
</div>
</div>
<!-- <label class="label">Sign</label> -->
<div class="block">
<div class="control">
<label class="radio button is-link">
<input type="radio" name="2-sign" value="X">
<i aria-hidden="true" class="fas fa-times" title="Select X sign"></i>
<span class="sr-only">Select X sign</span>
</label>
<label class="radio button is-link">
<input type="radio" name="2-sign" value="O" checked>
<i aria-hidden="true" class="far fa-circle" title="Select O sign"></i>
<span class="sr-only">Select O sign</span>
</label>
</div>
</div>
</div>
<button class="button is-primary start-game" disabled>Begin!</button>
</div>
</form>
<div class="block active-game hide">
<div><p><span id="turn"></span>'s turn</p></div>
<button class="button is-primary restart">
<i aria-hidden="true" class="fas fa-undo-alt" title="Restart game"></i>
<span class="sr-only">Restart game</span>
</button>
</div>
</div>
<div class="modal">
<div class="modal-background"></div>
<div class="modal-content">
<div class="box">
<p></p>
<p>Play again?</p>
<button class="button is-primary restart">
<i aria-hidden="true" class="fas fa-undo-alt" title="Restart game"></i>
<span class="sr-only">Restart game</span>
</button>
</div>
</div>
</div>
</section>
</main>
<script src="scripts.js"></script>
</body>
</html>