-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
125 lines (115 loc) · 5.18 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Play Reversi</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet">
<script src="script.js" defer></script>
</head>
<body>
<!-- Determines how opponent is chosen -->
<div class="player-type-chooser">
<h2>Find player</h2>
<input type="text" placeholder="Enter your username (required)" id="username" autocomplete="off"><br>
<button id="random-player" disabled>Random</button>
<button id="custom-player" disabled>Custom</button>
</div>
<!-- Used to connect to custom player by entering id -->
<div class="custom-player-chooser hidden">
Your Id: <span id="client-id"></span><br>
<input id="custom-player-id" type="text" placeholder="Opponent id" autocomplete="off"><br>
<button id="custom-player-connect">Connect</button>
</div>
<!-- Loading animation -->
<div class="spinning-animation hidden">
<div class="container">
<div class="spinner">
<div class="spinner">
<div class="spinner">
</div>
</div>
</div>
</div>
</div>
<!-- Details of game: score, turn, etc -->
<div id="game-details" class="hidden">
<div><span id="game-title"></span></div>
<div>
<div>Reds: <span id="red-count"></span></div>
<div>Turn: <span id="turn"></span></div>
<div>Greens: <span id="green-count"></span></div>
</div>
</div>
<!-- The 8x8 board with button to make moves -->
<div class="board hidden">
<!-- Covers the parent div and shows game results after game finishes -->
<div class="game-result hidden">
</div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
<div class="button-wrapper"><button></button></div>
</div>
</body>
</html>