mokele / goban.js

Extensible javascript for Go board geographies/graphs. You can even draw round boards with https://github.com/mokele/roundgoban

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

var goban = new Goban({
  drawer: new Goban.drawer({showCoords: true}),
  geometry: Goban.geometry.square(19)
});
var tile = 'b';
goban.hoverPlaceAndFocus(
  'ghost', function() {
    return $('<img src="http://mokele.github.com/go-svg/Go_' + tile + '.svg" class="ghost"/>');
  },
  'stone', function() {
    return $('<img src="http://mokele.github.com/go-svg/Go_' + tile + '.svg" class="stone"/>');
  },
  'focused', function() {
    return $('<img src="http://mokele.github.com/go-svg/Go_placed' + tile + '.svg" class="focused"/>');
  },
  function(pointId) {
    tile = tile=='b'?'w':'b';
  }
);
$('#goban').append(goban.element);

About

Extensible javascript for Go board geographies/graphs. You can even draw round boards with https://github.com/mokele/roundgoban


Languages

Language:JavaScript 71.9%Language:HTML 24.6%Language:CSS 3.6%