Using jGoBoard 1.0

How to use it

  1. Download jGoBoard 1.0
  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"
    <script type="text/javascript" src="jgo/jgoboard.js"></script>
  4. Make a simple element for your go board:
    <table class="jgo_board" id="board">
  5. After the page has loaded, generate the board using JavaScript:
    $(document).ready(function(){ // jQuery way
        board = jgo_generateBoard($("#board"));
  6. 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
  7. 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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.