From 4484b162d0dbae7e00e89ac713ca23172742b708 Mon Sep 17 00:00:00 2001 From: programarivm Date: Thu, 11 Jan 2024 10:15:42 +0100 Subject: [PATCH] Documented the /stockfish command --- docs/stockfish.md | 39 +++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 40 insertions(+) create mode 100644 docs/stockfish.md diff --git a/docs/stockfish.md b/docs/stockfish.md new file mode 100644 index 00000000..866e2847 --- /dev/null +++ b/docs/stockfish.md @@ -0,0 +1,39 @@ +# /stockfish + +Uses Stockfish to make a move. + +| Name | Description | Required | +| ---- | ----------- | -------- | +| `Skill Level` | The skill level. | Yes | +| `depth` | The number of half moves the engine looks ahead. | Yes | + +## Usage + +### Example + +Start a classical game and ask Stockfish to respond with a move. + +```js +ws.send('/start classical stockfish w'); +ws.send('/play_lan w e2e4'); +ws.send('/stockfish "{\\"Skill Level\\":20}" "{\\"depth\\":12}"'); +``` + +```text +{ + "/stockfish": { + "turn": "w", + "pgn": "c5", + "castlingAbility": "KQkq", + "movetext": "1.e4 c5", + "fen": "rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6", + "isCapture": false, + "isCheck": false, + "isMate": false, + "isStalemate": false, + "isFivefoldRepetition": false, + "mode": "stockfish", + "variant": "classical" + } +} +``` diff --git a/mkdocs.yml b/mkdocs.yml index d16765b7..a1458732 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,4 +14,5 @@ pages: - /rematch: rematch.md - /restart: restart.md - /inbox: inbox.md + - /stockfish: stockfish.md theme: readthedocs