-
Notifications
You must be signed in to change notification settings - Fork 23
/
chess.html
72 lines (67 loc) · 2.74 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
67
68
69
70
71
72
<!DOCTYPE HTML>
<html>
<head>
<title>ChessBuddy</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="Play chess with Go, HTML5, WebSockets and random strangers!" />
<link rel="stylesheet" type="text/css" href="/chess.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<script type="text/javascript" src="chess.js"></script>
<link href='http://fonts.googleapis.com/css?family=Oleo+Script:700' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="wrap">
<header>
<p class="intro">
Play chess with Go, HTML5,<br />
WebSockets and random strangers!
</p>
<h1><a href="/">ChessBuddy</a></h1>
</header>
<aside>
<canvas id="clocks" width="280" height="130">
Your browser does not support the canvas element.
</canvas>
<label id="l_history" for="history">history</label>
<div id="history">
</div>
</aside>
<div id="game">
<canvas id="base" width="400" height="400" class="layer" style="z-index: 10;">
Your browser does not support the canvas element.
</canvas>
<canvas id="mark" width="400" height="400" class="layer" style="z-index: 20;">
</canvas>
<canvas id="anim" width="400" height="400" class="layer" style="z-index: 30;">
</canvas>
<div id="dlg-connect" class="dialog" style="display: block;">
<h3 id="connect">Connecting…</h3>
</div>
<div id="dlg-waiting" class="dialog">
<h3>Waiting for another player…</h3>
<p>(or <a href="/ai">play against the computer</a>)</p>
</div>
<div id="dlg-result" class="dialog">
<h3 id="result">Checkmate: White wins!</h3>
<p>Do you want to <a href="/">start a new game</a>?</p>
</div>
<div id="dlg-promote" class="dialog">
Promote to?
</div>
</div>
<script type="text/javascript">
var canvas = document.getElementById("board");
var clocks = document.getElementById("clocks");
var chess = new ChessGame(canvas, clocks, "{{.}}");
</script>
<footer>
<div class="stats">
<span id="numPlayers">N/A</span> players online
</div>
© Christoph Hack, 2012. Grab the source on
<a href="https://github.com/tux21b/ChessBuddy">GitHub</a>.<br />
Proudly powered by <a href="http://golang.org/">Go 1.2</a>!
</footer>
</div>
</body>
</html>