UNPKG

koishi-plugin-gomoku

Version:

A Gomoku (Five in a Row) game plugin for Koishi

37 lines (36 loc) 773 B
import { Context, Schema } from 'koishi'; export interface Config { boardSize: number; winCondition: number; } export declare const Config: Schema<Config>; declare module 'koishi' { interface Tables { gomoku_games: GomokuGameData; } } export interface GomokuGameData { id: number; channelId: string; guildId: string; board: string; currentPlayer: string; players: string[]; state: GameState; currentTurn: ChessPiece; lastMove: string; createTime: number; updateTime: number; } declare enum ChessPiece { EMPTY = 0, BLACK = 1, WHITE = 2 } declare enum GameState { WAITING = 0, PLAYING = 1, FINISHED = 2 } export declare function apply(ctx: Context, config: Config): void; export {};