-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
61 lines (50 loc) · 1.86 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
<html>
<head>
<title>Javascript Chess - By Dave Fowler</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<script src="underscore.js" type="text/javascript"></script>
<script type="text/javascript" src="chessjs/chess.js"></script>
<script type="text/javascript" src="ai.js"></script>
<script type="text/javascript" src="game.js"></script>
<link href="game.css" rel="stylesheet" type="text/css">
</head>
<body>
<a href="https://github.com/davefowler/chess/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div id="stats">
<ul>
<li><span class="option-title">Turn</span> - <span id="turn"></span></li>
<li><button type='button' id="undo-button">Undo</button></li>
<li>Human vs
<select id="vs">
<option value="computer" selected>Computer</option>
<option value="human">Human</option>
</select>
</li>
<li>Promotion -
<select id="promotion">
<option value="q" selected>Queen</option>
<option value="r">Rook</option>
<option value="n">Knight</option>
<option value="b">Bishop</option>
</select>
</li> <li><span class="option-title">Dead</span>
<ul id="dead"></ul>
</li>
<li><span class="option-title">Moves</span>
<ul id="moves">
</ul>
</li>
</ul>
</div>
<div id="board"></div>
<script type="text/javascript">
chess.render();
$('#undo-button').live('click', function() {
chess.undo();
chess.undo(); // Undo twice to be fair to other player
chess.render();
});
</script>
</body>
</html>