How to use it
2. Copy the jgo folder to your web application directory
3. Add the stylesheet, jQuery library and jGoBoard library to page header:
<link rel="stylesheet" href="jgo/jgoboard.css" type="text/css" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"> </script> <script type="text/javascript" src="jgo/all-min.js"></script>
Make a simple element for your go board:
<div class="jgo_board" id="board"></div>
After the page has loaded, generate the board using JavaScript:
$(document).ready(function(){ // jQuery way
board = jgo_generateBoard($("#board"));
});
4. Use simple commands to manipulate the board:
coord = new JGOCoordinate("K10"); // Coordinate pointing at tengen
if(board.get(coord) == JGO_CLEAR) // if no stone at tengen
board.set(coord, JGO_BLACK); // put a black stone in it
5. jGoBoard is compact, simple and clearly documented – see jgoboard.js for all functionality and .html files for examples of usage.