-
Notifications
You must be signed in to change notification settings - Fork 100
/
chess.html
66 lines (66 loc) · 2.96 KB
/
chess.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
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<title>GarboChess Javascript</title>
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.24.custom.min.js"></script>
<script type="text/javascript" src="js/garbochess.js"></script>
<script type="text/javascript" src="js/boardui.js"></script>
<script type="text/javascript">
$(document).ready(function () {
g_timeout = 1000;
UINewGame();
});
</script>
<style type="text/css">
#FenTextBox {
width: 400px;
}
#TimePerMove {
width: 50px;
}
.no-highlight {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.sprite-bishop_black{ background-position: 0 0; width: 45px; height: 45px; }
.sprite-bishop_white{ background-position: 0 -95px; width: 45px; height: 45px; }
.sprite-king_black{ background-position: 0 -190px; width: 45px; height: 45px; }
.sprite-king_white{ background-position: 0 -285px; width: 45px; height: 45px; }
.sprite-knight_black{ background-position: 0 -380px; width: 45px; height: 45px; }
.sprite-knight_white{ background-position: 0 -475px; width: 45px; height: 45px; }
.sprite-pawn_black{ background-position: 0 -570px; width: 45px; height: 45px; }
.sprite-pawn_white{ background-position: 0 -665px; width: 45px; height: 45px; }
.sprite-queen_black{ background-position: 0 -760px; width: 45px; height: 45px; }
.sprite-queen_white{ background-position: 0 -855px; width: 45px; height: 45px; }
.sprite-rook_black{ background-position: 0 -950px; width: 45px; height: 45px; }
.sprite-rook_white{ background-position: 0 -1045px; width: 45px; height: 45px; }
</style>
</head>
<body>
<div align="center">
<div>
<a href="javascript:UINewGame()">New game</a>
<select onchange="javascript:UIChangeStartPlayer()">
<option value="white">White</option>
<option value="black">Black</option>
</select>
Time per move: <input id="TimePerMove" value="3000" onchange="javascript:UIChangeTimePerMove()" />ms
<a href="javascript:UIUndoMove()">Undo</a>
</div>
<div style="margin-top:5px;">
<div id='board'></div>
<span id='output'></span><br/>
<textarea cols='50' rows='6' id='PgnTextBox'></textarea><br/>
<div>
<a id='AnalysisToggleLink' href="javascript:UIAnalyzeToggle()">Analysis: Off</a>
</div>
FEN: <input id='FenTextBox' onchange="javascript:UIChangeFEN()"/>
</div>
<div>
<h2>About</h2>
<p>It started as a feasibility project to see how Javascript could do in Chess, then languished until Chrome came along.</p>
<a href="..\projects.html">Back to Projects</a>
</div>
</div>
</body>
</html>