UNPKG

generic-min-max

Version:

This node.js module exports a generic min-max algorithm, alongside some implementations This package comes with full typescript support!

12 lines (11 loc) 381 B
import { BoardGameState, Game } from "../types"; interface ChessState extends BoardGameState { } declare class ChessGame implements Game<ChessState> { constructor(initialState?: ChessState); getAllNextStates(state: ChessState): Array<ChessState>; getHeuristic(state: ChessState): number; initialState: ChessState; } export default ChessGame; export { ChessState };