Go board game in Javascript.
var some_var = GoBoard(container_id, length, board_size);
-
container_id: an element container with with a uniqueidattribute -
length: render the element container into a square of lengthlength -
board_size: render the go board of gridboard_sizexboard_size. Must be an integer between2and19.
-
Place
<script src="path/to/gojs.js"></script>in theheadelement, or right before thebodytag. -
Place an empty
divcontainer with a uniqueidattribute. Adivelement is preferred, but other elements such aspmay 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