stockfish-ts
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Stockfish-TS

A wrapper for the Stockfish CLI in TypeScript. Developed this for use in my chess bot project.

Installation

npm install stockfish-ts

Usage example

import Stockfish from '.'

(async () => {
  const path = './stockfish'
  const stockfish = new Stockfish(path)

  stockfish.setFen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1')
  const bestmove = await stockfish.getBestMove()
  console.log(`The best move is: ${bestmove}`)
})()

Readme

Keywords

none

Package Sidebar

Install

npm i stockfish-ts

Weekly Downloads

3

Version

2.0.0

License

ISC

Unpacked Size

9.17 kB

Total Files

6

Last publish

Collaborators

  • memo12334