-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dc3a08
commit b036153
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# /play | ||
|
||
Plays a move in Portable Game Notation (PGN) format. | ||
|
||
## `color` | ||
|
||
The color as per these options. | ||
|
||
- `w` for the white pieces. | ||
- `b` for the black pieces. | ||
|
||
## `pgn` | ||
|
||
The chess move in PGN format. | ||
|
||
--- | ||
|
||
### Usage | ||
|
||
#### Example | ||
|
||
Starts a classical game to play 1.e4. | ||
|
||
```js | ||
ws.send('/start "{\\"variant\\":\\"classical\\",\\"mode\\":\\"analysis\\"}"'); | ||
ws.send('/play "{\\"color\\":\\"w\\",\\"pgn\\":\\"e4\\"}"'); | ||
``` | ||
|
||
```text | ||
{ | ||
"/play": { | ||
"turn": "b", | ||
"movetext": "1.e4", | ||
"fen": "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3", | ||
"variant": "classical", | ||
"isValid": true | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters