Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (40 sloc) 938 Bytes
<!doctype html>
<html>
<head>
<title>Goban</title>
<meta charset="utf-8" />
<script src="goban.js?30"></script>
</head>
<body>
<a href="https://github.com/xcombelle/js-goban"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<p>碁盤アプリのデモです</p>
<canvas id="goban" width="600" height="600" />
<script>
"use strict";
var board = new Goban.Board({
size: 19,
viewClass: Goban.CanvasView,
viewOptions: {
'document': document,
'id': 'goban',
},
});
var moves = [
[3, 3],
[2, 5],
[6, 3],
[1, 3],
[2, 2],
[2, 7]
];
setInterval(function() {
var move = moves.shift();
if ( move != undefined ) {
board.move(move[0], move[1]);
board.render();
}
}, 1000);
board.render();
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.