-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
168 lines (168 loc) · 10.8 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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8"/>
<meta name="author" content="Guillaume Mayer"/>
<meta name="keywords" content="DumbChess, Chess, Desarrollador, Analista, Programador, PowerBuilder, Power Builder, Java, Santiago, Chile, Guillaume Mayer, Front, JavaScript, Html5, SVG"/>
<meta property="og:title" content="Dumb Chess"/>
<meta property="og:image" content="http://gm77.alwaysdata.net/chess/img/preview.png"/>
<meta property="og:description" content="A chess engine you can beat"/>
<meta property="og:url" content="http://gm77.alwaysdata.net/chess"/>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Indie+Flower"/>
<link rel="stylesheet" type="text/css" href="css/chess.css"/>
<title>Dumb Chess</title>
</head>
<body>
<div id="main">
<div id="pan-side1" class="pan-side">
<div class="token"><h2>Welcome to</h2></div>
<div class="token"><h1>Dumb Chess</h1></div>
<div class="token"><small>v0.0.0.83917</small></div>
<div class="token"><p>The most stupid chess engine on the internet</p></div>
<div class="token"><p>This is based on</p></div>
<div class="token"><p>HTML5</p></div>
<div class="token"><p>SVG</p></div>
<div class="token"><p>and JavaScript</p></div>
<div class="token"><small>(Hand-made)</small></div>
<div class="token"><a href="https://github.com/Guillaume-Mayer/dumbchess-client" target="_blank">Source on GitHub</a></div>
</div>
<div id="pan-main">
<svg id="svg" width="100%" height="100%">
<g id="tiles">
<rect x="0%" y="87.5%" width="12.5%" height="12.5%" id="a1" class="tile-b" data-row="0" data-col="0"/>
<rect x="12.5%" y="87.5%" width="12.5%" height="12.5%" id="b1" class="tile-w" data-row="0" data-col="1"/>
<rect x="25%" y="87.5%" width="12.5%" height="12.5%" id="c1" class="tile-b" data-row="0" data-col="2"/>
<rect x="37.5%" y="87.5%" width="12.5%" height="12.5%" id="d1" class="tile-w" data-row="0" data-col="3"/>
<rect x="50%" y="87.5%" width="12.5%" height="12.5%" id="e1" class="tile-b" data-row="0" data-col="4"/>
<rect x="62.5%" y="87.5%" width="12.5%" height="12.5%" id="f1" class="tile-w" data-row="0" data-col="5"/>
<rect x="75%" y="87.5%" width="12.5%" height="12.5%" id="g1" class="tile-b" data-row="0" data-col="6"/>
<rect x="87.5%" y="87.5%" width="12.5%" height="12.5%" id="h1" class="tile-w" data-row="0" data-col="7"/>
<rect x="0%" y="75%" width="12.5%" height="12.5%" id="a2" class="tile-w" data-row="1" data-col="0"/>
<rect x="12.5%" y="75%" width="12.5%" height="12.5%" id="b2" class="tile-b" data-row="1" data-col="1"/>
<rect x="25%" y="75%" width="12.5%" height="12.5%" id="c2" class="tile-w" data-row="1" data-col="2"/>
<rect x="37.5%" y="75%" width="12.5%" height="12.5%" id="d2" class="tile-b" data-row="1" data-col="3"/>
<rect x="50%" y="75%" width="12.5%" height="12.5%" id="e2" class="tile-w" data-row="1" data-col="4"/>
<rect x="62.5%" y="75%" width="12.5%" height="12.5%" id="f2" class="tile-b" data-row="1" data-col="5"/>
<rect x="75%" y="75%" width="12.5%" height="12.5%" id="g2" class="tile-w" data-row="1" data-col="6"/>
<rect x="87.5%" y="75%" width="12.5%" height="12.5%" id="h2" class="tile-b" data-row="1" data-col="7"/>
<rect x="0%" y="62.5%" width="12.5%" height="12.5%" id="a3" class="tile-b" data-row="2" data-col="0"/>
<rect x="12.5%" y="62.5%" width="12.5%" height="12.5%" id="b3" class="tile-w" data-row="2" data-col="1"/>
<rect x="25%" y="62.5%" width="12.5%" height="12.5%" id="c3" class="tile-b" data-row="2" data-col="2"/>
<rect x="37.5%" y="62.5%" width="12.5%" height="12.5%" id="d3" class="tile-w" data-row="2" data-col="3"/>
<rect x="50%" y="62.5%" width="12.5%" height="12.5%" id="e3" class="tile-b" data-row="2" data-col="4"/>
<rect x="62.5%" y="62.5%" width="12.5%" height="12.5%" id="f3" class="tile-w" data-row="2" data-col="5"/>
<rect x="75%" y="62.5%" width="12.5%" height="12.5%" id="g3" class="tile-b" data-row="2" data-col="6"/>
<rect x="87.5%" y="62.5%" width="12.5%" height="12.5%" id="h3" class="tile-w" data-row="2" data-col="7"/>
<rect x="0%" y="50%" width="12.5%" height="12.5%" id="a4" class="tile-w" data-row="3" data-col="0"/>
<rect x="12.5%" y="50%" width="12.5%" height="12.5%" id="b4" class="tile-b" data-row="3" data-col="1"/>
<rect x="25%" y="50%" width="12.5%" height="12.5%" id="c4" class="tile-w" data-row="3" data-col="2"/>
<rect x="37.5%" y="50%" width="12.5%" height="12.5%" id="d4" class="tile-b" data-row="3" data-col="3"/>
<rect x="50%" y="50%" width="12.5%" height="12.5%" id="e4" class="tile-w" data-row="3" data-col="4"/>
<rect x="62.5%" y="50%" width="12.5%" height="12.5%" id="f4" class="tile-b" data-row="3" data-col="5"/>
<rect x="75%" y="50%" width="12.5%" height="12.5%" id="g4" class="tile-w" data-row="3" data-col="6"/>
<rect x="87.5%" y="50%" width="12.5%" height="12.5%" id="h4" class="tile-b" data-row="3" data-col="7"/>
<rect x="0%" y="37.5%" width="12.5%" height="12.5%" id="a5" class="tile-b" data-row="4" data-col="0"/>
<rect x="12.5%" y="37.5%" width="12.5%" height="12.5%" id="b5" class="tile-w" data-row="4" data-col="1"/>
<rect x="25%" y="37.5%" width="12.5%" height="12.5%" id="c5" class="tile-b" data-row="4" data-col="2"/>
<rect x="37.5%" y="37.5%" width="12.5%" height="12.5%" id="d5" class="tile-w" data-row="4" data-col="3"/>
<rect x="50%" y="37.5%" width="12.5%" height="12.5%" id="e5" class="tile-b" data-row="4" data-col="4"/>
<rect x="62.5%" y="37.5%" width="12.5%" height="12.5%" id="f5" class="tile-w" data-row="4" data-col="5"/>
<rect x="75%" y="37.5%" width="12.5%" height="12.5%" id="g5" class="tile-b" data-row="4" data-col="6"/>
<rect x="87.5%" y="37.5%" width="12.5%" height="12.5%" id="h5" class="tile-w" data-row="4" data-col="7"/>
<rect x="0%" y="25%" width="12.5%" height="12.5%" id="a6" class="tile-w" data-row="5" data-col="0"/>
<rect x="12.5%" y="25%" width="12.5%" height="12.5%" id="b6" class="tile-b" data-row="5" data-col="1"/>
<rect x="25%" y="25%" width="12.5%" height="12.5%" id="c6" class="tile-w" data-row="5" data-col="2"/>
<rect x="37.5%" y="25%" width="12.5%" height="12.5%" id="d6" class="tile-b" data-row="5" data-col="3"/>
<rect x="50%" y="25%" width="12.5%" height="12.5%" id="e6" class="tile-w" data-row="5" data-col="4"/>
<rect x="62.5%" y="25%" width="12.5%" height="12.5%" id="f6" class="tile-b" data-row="5" data-col="5"/>
<rect x="75%" y="25%" width="12.5%" height="12.5%" id="g6" class="tile-w" data-row="5" data-col="6"/>
<rect x="87.5%" y="25%" width="12.5%" height="12.5%" id="h6" class="tile-b" data-row="5" data-col="7"/>
<rect x="0%" y="12.5%" width="12.5%" height="12.5%" id="a7" class="tile-b" data-row="6" data-col="0"/>
<rect x="12.5%" y="12.5%" width="12.5%" height="12.5%" id="b7" class="tile-w" data-row="6" data-col="1"/>
<rect x="25%" y="12.5%" width="12.5%" height="12.5%" id="c7" class="tile-b" data-row="6" data-col="2"/>
<rect x="37.5%" y="12.5%" width="12.5%" height="12.5%" id="d7" class="tile-w" data-row="6" data-col="3"/>
<rect x="50%" y="12.5%" width="12.5%" height="12.5%" id="e7" class="tile-b" data-row="6" data-col="4"/>
<rect x="62.5%" y="12.5%" width="12.5%" height="12.5%" id="f7" class="tile-w" data-row="6" data-col="5"/>
<rect x="75%" y="12.5%" width="12.5%" height="12.5%" id="g7" class="tile-b" data-row="6" data-col="6"/>
<rect x="87.5%" y="12.5%" width="12.5%" height="12.5%" id="h7" class="tile-w" data-row="6" data-col="7"/>
<rect x="0%" y="0%" width="12.5%" height="12.5%" id="a8" class="tile-w" data-row="7" data-col="0"/>
<rect x="12.5%" y="0%" width="12.5%" height="12.5%" id="b8" class="tile-b" data-row="7" data-col="1"/>
<rect x="25%" y="0%" width="12.5%" height="12.5%" id="c8" class="tile-w" data-row="7" data-col="2"/>
<rect x="37.5%" y="0%" width="12.5%" height="12.5%" id="d8" class="tile-b" data-row="7" data-col="3"/>
<rect x="50%" y="0%" width="12.5%" height="12.5%" id="e8" class="tile-w" data-row="7" data-col="4"/>
<rect x="62.5%" y="0%" width="12.5%" height="12.5%" id="f8" class="tile-b" data-row="7" data-col="5"/>
<rect x="75%" y="0%" width="12.5%" height="12.5%" id="g8" class="tile-w" data-row="7" data-col="6"/>
<rect x="87.5%" y="0%" width="12.5%" height="12.5%" id="h8" class="tile-b" data-row="7" data-col="7"/>
</g>
<g id="highlights"/>
<g id="pieces"/>
</svg>
</div>
<div id="pan-side2" class="pan-side">
<div id="colorToPlay" class="token White">to play</div>
<div id="thinking" class="token">Let me think about it !</div>
<div id="toggleShowLegalMoves" class="token ON">Show legal moves: </div>
<div id="toggleSound" class="token OFF">Sound: </div>
<div id="rotateBoard" class="token OFF">White on top: </div>
<div id="unplayLastMove" class="token action">Unplay Last Move</div>
<div id="restartGame" class="token action">Restart Game</div>
<div id="toggleLevel" class="token MEDIUM">Level: </div>
<div id="toggleQuiescence" class="token OFF">Quiescence: </div>
<div class="token">
<u>Todo</u>
<ol>
<li>Deal with Draw</li>
<li>Save/load (LokiJS)</li>
<li>Think in background (Web Worker)</li>
<li>Play with someone (Web Socket)</li>
<li>Dumb mode</li>
<li>AI Improvements</li>
</ol>
</div>
</div>
</div>
<div id="prom" class="popup">
<div>
<p>Promote to</p>
<svg>
<rect x="0" y="0" width="50%" height="50%" class="tile-w"/>
<rect x="50%" y="0" width="50%" height="50%" class="tile-b"/>
<rect x="0" y="50%" width="50%" height="50%" class="tile-b"/>
<rect x="50%" y="50%" width="50%" height="50%" class="tile-w"/>
<g id="prom_Black">
<image x="0" y="0" width="50%" height="50%"/>
<image x="50%" y="0" width="50%" height="50%"/>
<image x="0" y="50%" width="50%" height="50%"/>
<image x="50%" y="50%" width="50%" height="50%"/>
</g>
<g id="prom_White">
<image x="0" y="0" width="50%" height="50%"/>
<image x="50%" y="0" width="50%" height="50%"/>
<image x="0" y="50%" width="50%" height="50%"/>
<image x="50%" y="50%" width="50%" height="50%"/>
</g>
</svg>
<p align="right">or <a id="cancelPromote" href="#">Cancel</a></p>
</div>
</div>
<div id="win" class="popup">
<div>
<svg>
<text x="10%" y="60%" textLength="80%" class="win">YOU WIN !!!</text>
</svg>
<p align="right"><a id="playAgain" href="#">Play again</a></p>
</div>
</div>
<div id="lose" class="popup">
<div>
<svg>
<text x="10%" y="60%" textLength="80%" class="lose">YOU LOSE !!!</text>
</svg>
<p align="right"><a id="retry" href="#">Retry</a> or <a id="unplayAfterLose" href="#">unplay</a></p>
</div>
</div>
<script type="text/javascript" src="js/dumb-chess.js"></script>
<script type="text/javascript" src="js/dumb-client.js"></script>
<script type="text/javascript" src="js/dumb-main.js"></script>
</body>
</html>