harrymt / bot-o-tron

Try out lichess' bot interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bot-o-tron Build Status Coverage Status Dependency Status devDependency Status Codacy Badge

Try out lichess' bot interface https://lichess.org/api#tag/Chess-Bot

Setup

$ nvm use v9.11.1
$ yarn install

# Linux
$ export API_TOKEN=xxxxxxxxxx

# Windows
$ setx API_TOKEN xxxxxxxxxx

Test

$ yarn test
$ nyc yarn test

Run

$ yarn start

To implement your chess bot you only need to create one class that implements the method:

  getNextMove(moves) {
      return uciMove;
  }

Where moves is a string of moves so far in uci format e.g. "e2e4 b8c6 f2f4"

See LegalMovePlayer for minimal implementation using chess.js

About

Try out lichess' bot interface


Languages

Language:JavaScript 100.0%