godash
v2.5.2
Published
Data structures and utilities to represent the game of Go
Readme
Data structures and utilities to represent the game of Go.
This library depends on Immutable.js and lodash.
Getting Started
Install godash via npm.
npm install godashrequire and use it in your modules.
var godash = require('godash');
var board = godash.Board(19);
var tengen = godash.Coordinate(9, 9); // 0-based
board.moves.has(tengen); // false
var standardOpening = placeStone(
board,
tengen,
godash.BLACK
);
standardOpening.moves.has(tengen); // trueWhy Godash?
Godash provides the "primitives" for Go necessary for creating UIs that go beyond a simple SGF player. You can create whatever UI you want without having to reinvent the wheel every time.
Check out the documentation to see what Godash provides.
Breaking changes from version 1 to 2
- Due to upgrading to
immutable@4,BoardandCoordinateare no longer subclasses ofSeq. Boardconstructor changed to takeMove.
Version 2.5.0 - Immutable v5 upgrade
- Upgraded to
immutable@5with no breaking changes to the Godash API. - All existing code remains compatible - no changes required.
Related Projects
- Elixir port - port to Elixir by kokolegorille
- pizza - an anonymous go server (source)
- react-go-board - a simple go board component for React
- Way to Go - a rewrite of Hiroki Mori's Interactive Way to Go
