-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (40 loc) · 1.63 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hex board game</title>
<style type="text/css">
img#fork-me { position: absolute; top: 0; right: 0; border: 0; }
.container { margin-left: auto; margin-right: auto;
max-width: 800px; }
</style>
</head>
<body onload="hex.core.draw(document.getElementById('board'));">
<div class="container">
<a href="https://github.com/graue/cljs-hex"
><img id="fork-me" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"
alt="Fork me on GitHub">
</a>
<canvas onclick="hex.core.click(event)" id="board" width="700" height="500">
Your browser does not support <canvas>. How lame.
</canvas>
<h2>The Rules of Hex</h2>
<ul>
<li>Two players (red and blue) take turns placing stones.</li>
<li>Red owns the top and bottom edges. Blue owns the left and right
sides.</li>
<li>The player who connects his or her two sides with an unbroken
chain wins.</li>
<li>Red goes first. After red's first move, the second player
may choose to swap colors. If so, the first player, now blue,
immediately plays again. (The swap rule neutralizes first-player
advantage.)</li>
</ul>
<p>For more info and strategies, see <a href="http://www.hexwiki.org/"
>Hex Wiki</a>.</p>
</div>
<script src="out/goog/base.js" type="text/javascript"></script>
<script src="hex.js" type="text/javascript"></script>
<script type="text/javascript">goog.require("hex.core");</script>
</body>
</html>