Skip to content

Commit

Permalink
Updated the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed May 22, 2024
1 parent 7cc2b94 commit 6a8b3b7
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 77 deletions.
6 changes: 3 additions & 3 deletions docs/accept.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ ws.send('/accept e69e3228e22dbcab5c2274646ae9a23647b222d084e26dea3216016d026f710
```text
{
"/accept": {
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwY2hlc3MubmV0IiwiaWF0IjoxNjk0NDQxOTcxLCJleHAiOjE2OTQ0NDU1NzEsInZhcmlhbnQiOiJjbGFzc2ljYWwiLCJzdWJtb2RlIjoiZnJpZW5kIiwiY29sb3IiOiJ3IiwibWluIjo1LCJpbmNyZW1lbnQiOjMsImZlbiI6InJuYnFrYm5yL3BwcHBwcHBwLzgvOC84LzgvUFBQUFBQUFAvUk5CUUtCTlIgdyBLUWtxIC0ifQ.POuK_cR3U_bblLa8LFyGg1AJEE5_iW_AquuNn7K4qHI",
"hash": "e69e3228e22dbcab5c2274646ae9a23647b222d084e26dea3216016d026f7108",
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhc3luYy5jaGVzc2xhYmxhYi5vcmciLCJpYXQiOjE3MTYzOTMxOTQsImV4cCI6MTcxNjM5Njc5NCwidmFyaWFudCI6ImNsYXNzaWNhbCIsInN1Ym1vZGUiOiJvbmxpbmUiLCJjb2xvciI6ImIiLCJtaW4iOjUsImluY3JlbWVudCI6MywiZmVuIjoicm5icWtibnIvcHBwcHBwcHAvOC84LzgvOC9QUFBQUFBQUC9STkJRS0JOUiB3IEtRa3EgLSJ9.uEVe0vMgOroQCKqTtXqvFZvTidHlESeaVqQXj7_FcdA",
"hash": "74cf7843",
"timer": {
"w": 300,
"b": 300
},
"startedAt": 1694441992
"startedAt": 1716393248
}
}
```
2 changes: 2 additions & 0 deletions docs/heuristics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ws.send('/heuristics "rnbqkb1r/p1pp1ppp/1p2pn2/8/2PP4/2N2N2/PP2PPPP/R1BQKB1R b K
"Protection",
"Threat",
"Attack",
"Discovered check",
"Doubled pawn",
"Passed pawn",
"Advanced pawn",
Expand Down Expand Up @@ -77,6 +78,7 @@ ws.send('/heuristics "rnbqkb1r/p1pp1ppp/1p2pn2/8/2PP4/2N2N2/PP2PPPP/R1BQKB1R b K
0,
0,
0,
0,
0
]
}
Expand Down
14 changes: 5 additions & 9 deletions docs/legal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# /legal

Returns the legal FEN positions of a piece.
Returns the legal moves of a piece.

| Name | Description | Required |
| ---- | ----------- | -------- |
Expand All @@ -19,13 +19,9 @@ ws.send('/legal e2');

```text
{
"/legal": {
"color": "w",
"id": "P",
"fen": {
"e3": "rnbqkbnr/pppppppp/8/8/8/4P3/PPPP1PPP/RNBQKBNR b KQkq -",
"e4": "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3"
}
}
"/legal": [
"e3",
"e4"
]
}
```
36 changes: 12 additions & 24 deletions docs/online-games.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,28 @@ ws.send('/online_games');
"/online_games": [
{
"iss": "async.chesslablab.org",
"iat": 1704983331,
"exp": 1704986931,
"iat": 1716395884,
"exp": 1716399484,
"variant": "classical",
"submode": "online",
"color": "b",
"min": 5,
"increment": 1,
"min": "17",
"increment": "8",
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -",
"hash": "d1a4f2f3688e3211e94fe643a679204806cd196303e44522e833815e4f728c65"
"hash": "ec82790d"
},
{
"iss": "async.chesslablab.org",
"iat": 1704983347,
"exp": 1704986947,
"iat": 1716395890,
"exp": 1716399490,
"variant": "960",
"submode": "online",
"color": "w",
"min": 10,
"increment": 5,
"fen": "bqrnnbkr/pppppppp/8/8/8/8/PPPPPPPP/BQRNNBKR w KQkq -",
"startPos": "BQRNNBKR",
"hash": "e71a27a35d021acfe9ad819348ec2c574f1962aa14fddc58df379d0b3c225cc8"
},
{
"iss": "async.chesslablab.org",
"iat": 1704983367,
"exp": 1704986967,
"variant": "capablanca",
"submode": "online",
"color": "b",
"min": 30,
"increment": 10,
"fen": "rnabqkbcnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNABQKBCNR w KQkq -",
"hash": "2e2c447c902a34f55145769fe9454cf055a6b3e7658756ade2b2ac783d24c568"
"min": "5",
"increment": "3",
"fen": "brnnkbrq/pppppppp/8/8/8/8/PPPPPPPP/BRNNKBRQ w KQkq -",
"startPos": "BRNNKBRQ",
"hash": "c0597f26"
}
]
}
Expand Down
5 changes: 4 additions & 1 deletion docs/play-lan.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ ws.send('/play_lan w e2e4');
"isMate": false,
"isStalemate": false,
"isFivefoldRepetition": false,
"isFiftyMoveDraw": false,
"isDeadPositionDraw": false,
"mode": "fen",
"variant": "classical"
"variant": "classical",
"isValid": true
}
}
```
6 changes: 3 additions & 3 deletions docs/restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Restarts an existing game.
### Example

```js
ws.send('/restart ffc536a8f44fc21b4d254e4fb85d7e33');
ws.send('/restart cf897a92');
```

```text
{
"/restart": {
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwY2hlc3MubmV0IiwiaWF0IjoxNjk0MTAxOTI2LCJleHAiOjE2OTQxMDU1MjYsInZhcmlhbnQiOiJjbGFzc2ljYWwiLCJzdWJtb2RlIjoib25saW5lIiwiY29sb3IiOiJ3IiwibWluIjo1LCJpbmNyZW1lbnQiOjMsImZlbiI6InJuYnFrYm5yL3BwcHBwcHBwLzgvOC84LzgvUFBQUFBQUFAvUk5CUUtCTlIgdyBLUWtxIC0ifQ.sE6Is9GYf0R6l0_C8rt7VPE8fVChsYlb9teEQw_2QUQ",
"hash": "5665d2e6c84344db95aa9fdbb3bc196b88238bce22a1c58a41f2f269deee6c33",
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhc3luYy5jaGVzc2xhYmxhYi5vcmciLCJpYXQiOjE3MTYzOTMzOTksImV4cCI6MTcxNjM5Njk5OSwidmFyaWFudCI6ImNsYXNzaWNhbCIsInN1Ym1vZGUiOiJvbmxpbmUiLCJjb2xvciI6InciLCJtaW4iOiI1IiwiaW5jcmVtZW50IjoiMyIsImZlbiI6InJuYnFrYm5yL3BwcHBwcHBwLzgvOC84LzgvUFBQUFBQUFAvUk5CUUtCTlIgdyBLUWtxIC0ifQ.-i3o-ODk7HF_ifuwiXLzpP5Itw12QTB07XeqbEQdULM",
"hash": "72647a10",
"timer": {
"w": 300,
"b": 300
Expand Down
13 changes: 7 additions & 6 deletions docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,16 @@ ws.send('/start 960 san "{\\"movetext\\":\\"1.e4 Nc6 2.d4\\",\\"startPos\\":\\"B
| `add` | `color` | Yes |

```js
ws.send('/start classical stockfish b');
ws.send('/start classical stockfish {"color":"b"}');
```

```text
{
"/start": {
"variant": "classical",
"mode": "stockfish",
"color": "b"
"color": "b",
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -"
}
}
```
Expand All @@ -133,8 +134,8 @@ ws.send('/start classical play {"min":5,"increment":3,"color":"b","submode":"onl
"variant": "classical",
"mode": "play",
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -",
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhc3luYy5jaGVzc2xhYmxhYi5vcmciLCJpYXQiOjE3MTA1MjM2MzUsImV4cCI6MTcxMDUyNzIzNSwidmFyaWFudCI6ImNsYXNzaWNhbCIsInN1Ym1vZGUiOiJvbmxpbmUiLCJjb2xvciI6InciLCJtaW4iOiI1IiwiaW5jcmVtZW50IjoiMyIsImZlbiI6InJuYnFrYm5yL3BwcHBwcHBwLzgvOC84LzgvUFBQUFBQUFAvUk5CUUtCTlIgdyBLUWtxIC0ifQ.gGEgw7zZmJk3ftnS9Yu-RcvhFBzc9eKbvF_45hrEt4E",
"hash": "db4a87907dfaaede54c56b3edddbe7e3a8c01803f8906be7bb7a2e180353ce58"
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhc3luYy5jaGVzc2xhYmxhYi5vcmciLCJpYXQiOjE3MTYzOTE1MTMsImV4cCI6MTcxNjM5NTExMywidmFyaWFudCI6ImNsYXNzaWNhbCIsInN1Ym1vZGUiOiJvbmxpbmUiLCJjb2xvciI6ImIiLCJtaW4iOjUsImluY3JlbWVudCI6MywiZmVuIjoicm5icWtibnIvcHBwcHBwcHAvOC84LzgvOC9QUFBQUFBQUC9STkJRS0JOUiB3IEtRa3EgLSJ9.BBJROgd2AP9_65QM3UIuxHk9HJ7ySwb_Y7HlVFFxnQE",
"hash": "2a2c768c"
}
}
```
Expand All @@ -155,8 +156,8 @@ ws.send('/start classical play "{\\"min\\":5,\\"increment\\":3,\\"color\\":\\"w\
"variant": "classical",
"mode": "play",
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -",
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhc3luYy5jaGVzc2xhYmxhYi5vcmciLCJpYXQiOjE3MTA1MjM5MzUsImV4cCI6MTcxMDUyNzUzNSwidmFyaWFudCI6ImNsYXNzaWNhbCIsInN1Ym1vZGUiOiJmcmllbmQiLCJjb2xvciI6ImIiLCJtaW4iOiI1IiwiaW5jcmVtZW50IjoiMyIsImZlbiI6InJuYnFrYm5yL3BwcHBwcHBwLzgvOC84LzgvUFBQUFBQUFAvUk5CUUtCTlIgdyBLUWtxIC0ifQ.Tl_loA70IUidZ9XG9Pw9osC9MZIHbxjg_eDMkGS6des",
"hash": "7eb1642c7d5faf2dee2e5dd5aef871c55fe29b5791c8e67746664e8f2517727c"
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhc3luYy5jaGVzc2xhYmxhYi5vcmciLCJpYXQiOjE3MTYzOTE1NTAsImV4cCI6MTcxNjM5NTE1MCwidmFyaWFudCI6ImNsYXNzaWNhbCIsInN1Ym1vZGUiOiJmcmllbmQiLCJjb2xvciI6InciLCJtaW4iOjUsImluY3JlbWVudCI6MywiZmVuIjoicm5icWtibnIvcHBwcHBwcHAvOC84LzgvOC9QUFBQUFBQUC9STkJRS0JOUiB3IEtRa3EgLSJ9.t40rbfZJb8JF8QpVMx9v96yQXzw54gLALMnKRS6qFdE",
"hash": "c13d765b"
}
}
```
27 changes: 0 additions & 27 deletions docs/stockfish-eval.md

This file was deleted.

8 changes: 5 additions & 3 deletions docs/stockfish.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ ws.send('/stockfish "{\\"Skill Level\\":20}" "{\\"depth\\":12}"');
{
"/stockfish": {
"turn": "w",
"pgn": "c5",
"pgn": "e5",
"castlingAbility": "KQkq",
"movetext": "1.e4 c5",
"fen": "rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6",
"movetext": "1.e4 e5",
"fen": "rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq e6",
"isCapture": false,
"isCheck": false,
"isMate": false,
"isStalemate": false,
"isFivefoldRepetition": false,
"isFiftyMoveDraw": false,
"isDeadPositionDraw": false,
"mode": "stockfish",
"variant": "classical"
}
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ nav:
- /rematch: rematch.md
- /restart: restart.md
- /stockfish: stockfish.md
- /stockfish_eval: stockfish-eval.md
- /online_games: online-games.md
theme: readthedocs

0 comments on commit 6a8b3b7

Please sign in to comment.