Skip to content

beldur/go-lib

Repository files navigation

go-lib

go-lib is a collection of tools for the game of GO. For the moment it only has a React Component for drawing a board with stones :)

build status npm

Installation

$ yarn add go-lib

Usage

Rendering a GO board

import React from 'react'
import ReactDOM from 'react-dom'
import { Board } from 'go-lib/components'

const stones = [
  { coordinate: { x: 16, y: 4 }, color: 'B' },
  { coordinate: { x: 4, y: 16 }, color: 'W' },
]

ReactDOM.render(<Board size={19} positions={stones} />, document.body)