Using jGoBoard 2.1

How to use it

1. Download jGoBoard 2.1

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>