-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
266 lines (257 loc) · 9.67 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<html>
<head>
<title>Chess Engine</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="A simple chess AI." />
<!-- Google Icons (Material Design) -->
<!-- <link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
crossorigin="anonymous"
/> -->
<!-- Font Awesome -->
<!-- <script
src="https://kit.fontawesome.com/5b14db5f0b.js"
crossorigin="anonymous"
></script> -->
<!-- jQuery -->
<script
src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"
></script>
<!-- Chessboad CSS (slighly modified) -->
<link rel="stylesheet" href="css/chessboard.css" />
<!-- Chessboard JS -->
<script
defer
src="https://unpkg.com/@chrisoakman/[email protected]/dist/chessboard-1.0.0.min.js"
integrity="sha384-8Vi8VHwn3vjQ9eUHUxex3JSN/NFqUg3QbPyX8kWyb93+8AC/pPWTzj+nHtbC5bxD"
crossorigin="anonymous"
></script>
<!-- Chess JS (slightly modified) -->
<script defer src="js/chess.js"></script>
<!-- Bootstrap JS -->
<script
defer
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"
integrity="sha384-6khuMg9gaYr5AxOqhkVIODVIvm9ynTT5J4V1cfthmT+emCG6yVmEZsRHdxlotUnm"
crossorigin="anonymous"
></script>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<!-- Custom CSS -->
<link rel="stylesheet" href="css/main.css" />
<!-- Custom JS -->
<script defer src="js/main.js"></script>
</head>
<body>
<main>
<div class="container h-100">
<div class="row align-items-center py-1 change h-100">
<div class="col-md-6 d-flex flex-column h-100 justify-content-evenly">
<h1 class="text-align-center change">Chess Engine</h1>
<div class="row justify-content-center">
<span id="position-count" class="change">0</span>   positions
evaluated in   <span class="change" id="time">0</span>s.
</div>
<div class="row mb-3 justify-content-center change">
That's   <span id="positions-per-s">0</span>   positions /
s.
</div>
<div id="accordion">
<div class="card bootifull">
<div class="card-header" id="settingsHeading">
<h2 class="text-align-center">
<button
class="btn btn-header no-outline"
data-toggle="collapse"
data-target="#settings"
aria-expanded="false"
aria-controls="settings"
>
Settings
</button>
</h2>
</div>
</div>
<div
id="settings"
class="collapse"
aria-labelledby="settingsHeading"
data-parent="#accordion"
>
<div class="card-body">
<div class="row align-items-center justify-content-center">
<div class="form-group">
<label for="search-depth change"
>Search Depth (Black):</label
>
<select id="search-depth">
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected>3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
<div class="row align-items-center justify-content-center">
<div class="form-group">
<label for="search-depth-white change"
>Search Depth (White):</label
>
<select id="search-depth-white">
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected>3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
</div>
</div>
<div class="card bootifull">
<div class="card-header" id="openingPositionsHeading">
<h2 class="text-align-center">
<button
class="btn btn-header no-outline"
data-toggle="collapse"
data-target="#openingPositions"
aria-expanded="true"
aria-controls="openingPositions"
>
Opening Positions
</button>
</h2>
</div>
</div>
<div
id="openingPositions"
class="collapse"
aria-labelledby="openingPositionsHeading"
data-parent="#accordion"
>
<div class="card-body">
<div class="row my-3 text-align-center">
<div class="col-md-4 my-2">
<button class="btn btn-primary change" id="ruyLopezBtn">
Ruy Lopez
</button>
</div>
<div class="col-md-4 my-2">
<button
class="btn btn-primary change"
id="italianGameBtn"
>
Italian Game
</button>
</div>
<div class="col-md-4 my-2">
<button
class="btn btn-primary change"
id="sicilianDefenseBtn"
>
Sicilian Defense
</button>
</div>
</div>
</div>
</div>
<div class="card bootifull">
<div class="card-header" id="compVsCompHeading">
<h2 class="text-align-center">
<button
class="btn btn-header no-outline"
data-toggle="collapse"
data-target="#compVsComp"
aria-expanded="true"
aria-controls="compVsComp"
>
Computer vs. Computer
</button>
</h2>
</div>
</div>
<div
id="compVsComp"
class="collapse"
aria-labelledby="compVsCompHeading"
data-parent="#accordion"
>
<div class="card-body">
<div class="row text-align-center">
<div class="col-md-6 my-2">
<button class="btn btn-success" id="compVsCompBtn">
Start Game
</button>
</div>
<div class="col-md-6 my-2">
<button class="btn btn-danger" id="resetBtn">
Stop and Reset
</button>
</div>
</div>
</div>
</div>
</div>
<div class="row my-3 text-align-center">
<div class="col-md-12">
<h2>Advantage</h2>
<p>
<span id="advantageColor">Neither side</span> has the
advantage (+<span id="advantageNumber">0</span>).
</p>
<div class="progress">
<div
class="progress-bar bg-primary"
role="progressbar"
aria-valuenow="0"
style="width: 50%"
aria-valuemin="-2000"
aria-valuemax="4000"
id="advantageBar"
></div>
</div>
</div>
</div>
<div class="row my-3 text-align-center">
<div class="col-md-12">
<h2>Status</h2>
<p><span id="status">No check, checkmate, or draw.</span></p>
</div>
</div>
</div>
<div
class="col-md-6 py-1 d-flex flex-column h-100 justify-content-evenly"
>
<div
class="boardcontainer h-100 d-flex align-items-center justify-content-center"
>
<div id="myBoard" class="w-100"></div>
</div>
<div class="row my-3 text-align-center">
<div class="col-md-4 my-2">
<button class="btn btn-danger" id="undoBtn">Undo</button>
</div>
<div class="col-md-4 my-2">
<button class="btn btn-primary" id="startBtn">
Start Position
</button>
</div>
<div class="col-md-4 my-2">
<button class="btn btn-success" id="redoBtn">Redo</button>
</div>
</div>
</div>
</div>
</div>
</main>
</body>
</html>