Go board game in Javascript.
var some_var = GoBoard(container_id, length, board_size);
-
container_id
: an element container with with a uniqueid
attribute -
length
: render the element container into a square of lengthlength
-
board_size
: render the go board of gridboard_size
xboard_size
. Must be an integer between2
and19
.
-
Place
<script src="path/to/gojs.js"></script>
in thehead
element, or right before thebody
tag. -
Place an empty
div
container with a uniqueid
attribute. Adiv
element is preferred, but other elements such asp
may be used.Example:
<div id="go_board"></div>
Note: If the container is not empty, gojs will empty it!
-
Render the go board via
var go_board = GoBoard("go_board", 500, 19)
Click here to view the demo
-
All code excluding libraries are written in coffeescript which compiles into JavaScript.
-
Raphael JS is primarily used to render the Go board.
-
Utility libraries:
-
All JavaScript files are packaged together with RequireJS and its optimizer, and minified through UglifyJS2.
MIT License