-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
194 lines (190 loc) · 6.68 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css"
integrity="sha384-q94+BZtLrkL1/ohfjR8c6L+A6qzNH9R2hBLwyoAfu3i/WCvQjzL2RQJ3uNHDISdU"
crossorigin="anonymous"
/>
<script
src="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.js"
integrity="sha384-8Vi8VHwn3vjQ9eUHUxex3JSN/NFqUg3QbPyX8kWyb93+8AC/pPWTzj+nHtbC5bxD"
crossorigin="anonymous"
></script>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
crossorigin="anonymous"
/>
<script
defer
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"
></script>
<script src="https://scheduler.distributed.computer/dcp-client/dcp-client.js"></script>
<script>
//Causes the DCP Browser Worker to leave the public compute group
dcpConfig.worker.leavePublicGroup = true;
//Specifies one or more compute groups that the DCP Worker will join and retrieve computational workload from
dcpConfig.worker.computeGroups.push({
joinKey: "insight",
joinSecret: "dcp",
});
//Instantiate a DCP Browser Worker with paymentAddress (where Compute Credits get deposited) and maxWorkingSandboxes (number of concurrent sandboxes)
const worker = new dcp.worker.Worker({
paymentAddress: "0x2ae0d4fe077747e82016bc108d0b87bca5c4651c",
maxWorkingSandboxes: 2,
});
//Starts the DCP Browser Worker
worker.start();
//Optional events displayed in the console
worker.on("fetchStart", () => {
console.log("! fetching job slices...");
});
worker.on("fetch", (fetchedSlicesCount) => {
console.log(
"! fetched",
fetchedSlicesCount,
"job slices, computing..."
);
});
worker.on("submit", () => {
console.log("! submitting computed job slice result...");
});
worker.on("payment", (receipt) => {
console.log("! earned", receipt.payment, "Compute Credits");
});
</script>
<script defer type="module" src="scripts.js"></script>
</head>
<body>
<div class="container text-center">
<div class="row" id="promotionDiv">
<div class="col-md-8 col-lg-7 col-sm-12 margin-x-auto">
<div class="row">
<div class="col-3 gx-1 gy-1">
<button
class="promotionButtons btn btn-secondary"
id="queenButton"
>
<img
class="img-fluid"
id="queenImage"
src="./img/chessPieces/wikipedia/bQ.png"
alt=""
/>
</button>
</div>
<div class="col-3 gx-1 gy-1">
<button
class="promotionButtons btn btn-secondary"
id="rookButton"
>
<img
class="img-fluid"
id="rookImage"
src="./img/chessPieces/wikipedia/bR.png"
alt=""
/>
</button>
</div>
<div class="col-3 gx-1 gy-1">
<button
class="promotionButtons btn btn-secondary"
id="bishopButton"
>
<img
class="img-fluid"
id="bishopImage"
src="./img/chessPieces/wikipedia/bB.png"
alt=""
/>
</button>
</div>
<div class="col-3 gx-1 gy-1">
<button
class="promotionButtons btn btn-secondary"
id="knightButton"
>
<img
class="img-fluid"
id="knightImage"
src="./img/chessPieces/wikipedia/bN.png"
alt=""
/>
</button>
</div>
</div>
</div>
</div>
<div class="row">
<div
class="col-md-8 col-lg-7 col-sm-12 gy-1 margin-x-auto"
id="chessBoard"
></div>
</div>
<div class="row">
<div class="col-md-8 col-lg-7 col-sm-12 gy-1 margin-x-auto">
<label for="">
<h6>Search Depth</h6>
</label>
<select name="desiredDepth" id="depthSelect">
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<br />
<h3 id="analysis">Analysis: None</h3>
<h5 id="recommendedMove">Recommended Move: None</h5>
<h5 id="evaluation">Evaluation: None</h5>
<h5 id="pV">Principle Variation: None</h5>
<progress id="progressBar" value="0" max="1"></progress>
<br />
<div class="gy-1">
<button class="btn btn-primary gy-1" id="startBtn">
Reset Board
</button>
<button class="btn btn-primary gy-1" id="DCPBtn">
Distributed Analysis
</button>
<button class="btn btn-primary gy-1" id="aiMoveButton">
Local Analysis
</button>
</div>
<br />
<div class="input-group mb-3 gy-1">
<button class="btn btn-primary gy-1" id="loadPosition">
Load Position (FEN)
</button>
<input
type="text"
id="fen"
name="fen"
class="form-control gy-1"
placeholder="FEN String Here"
/>
</div>
<div class="" id="exPos">
<p>
Complex Example Position:<br />2rq2kb/pb1r3p/2n1R1pB/1pp2pN1/3p1Q2/P1PP2P1/1P3PBP/4R1K1
w - - 0 1
</p>
</div>
</div>
</div>
</div>
</body>
</html>