Module: util

Utility function module.
Source:

Methods

(static) getHandicapCoordinates(size, num) → {Array}

Helper function to create coordinates for standard handicap placement.
Parameters:
Name Type Description
size int Board size (9, 13, 19 supported).
num itn Number of handicap stones.
Source:
Returns:
Array of Coordinate objects.
Type
Array

(static) loadImages(sources, callback)

Load images and defined by object and invoke callback when completed.
Parameters:
Name Type Description
sources Object A dictionary of sources to load.
callback function A callback function to call with image dict.
Source:

(inner) extend(dest, src) → {Object}

Deep extend an object.
Parameters:
Name Type Description
dest Object Destination object to extend.
src Object Source object which properties will be copied.
Source:
Returns:
Extended destination object.
Type
Object