From d1440253028d5477de7eded644b1a549779dc10b Mon Sep 17 00:00:00 2001 From: programarivm Date: Wed, 11 Oct 2023 18:48:14 +0200 Subject: [PATCH] Documented the /draw command --- docs/draw.md | 37 +++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 38 insertions(+) create mode 100644 docs/draw.md diff --git a/docs/draw.md b/docs/draw.md new file mode 100644 index 00000000..cb9f3ba2 --- /dev/null +++ b/docs/draw.md @@ -0,0 +1,37 @@ +# /draw + +## Description + +Allows to draw a game. + +## Parameters + +| Name | Description | Required | +| ---- | ----------- | -------- | +| action | Accepts: propose, accept | Yes | + +## Usage + +### Propose a draw + +```js +ws.send('/draw propose'); +``` + +```text +{ + "/draw": "propose" +} +``` + +### Accept a draw + +```js +ws.send('/draw accept'); +``` + +```text +{ + "/draw": "accept" +} +``` diff --git a/mkdocs.yml b/mkdocs.yml index a617ddb7..a69a6cd4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,5 +7,6 @@ pages: - /heuristics: heuristics.md - /undo: undo.md - /accept: accept.md + - /draw: draw.md - /restart: restart.md theme: readthedocs