UNPKG

goban

Version:

[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/online-go/goban)

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;