UNPKG

goban-engine

Version:

This contains the built Go engine that is used by the Goban package. There are no display components in this package, only the logic for playing the game of Go, making it suitable for usage in node.js or other server-side environments.

16 lines (15 loc) 999 B
import { JGOFMove } from "../formats"; /** Decodes a single coordinate to a number */ export declare function decodeCoordinate(ch: string): number; /** Encodes a single coordinate to a number */ export declare function encodeCoordinate(coor: number): string; /** Decodes the pretty X coordinate to a number */ export declare function decodePrettyXCoordinate(ch: string): number; /** Encodes an X coordinate to a display encoding */ export declare function encodePrettyXCoordinate(coor: number): string; /** Encodes an x,y pair to "pretty" coordinates, like `"A3"`, or `"K10"` */ export declare function prettyCoordinates(x: number, y: number, board_height: number): string; /** Decodes GTP coordinates to a JGOFMove */ export declare function decodeGTPCoordinates(move: string, width: number, height: number): JGOFMove; /** Decodes pretty coordinates to a JGOFMove, this is an alias of decodeGTPCoordinates */ export declare function decodePrettyCoordinates(move: string, height: number): JGOFMove;