diff --git a/docs/takeback.md b/docs/takeback.md new file mode 100644 index 00000000..cbce336c --- /dev/null +++ b/docs/takeback.md @@ -0,0 +1,49 @@ +# /takeback + +## Description + +Allows to take back a move. + +## Parameters + +| Name | Description | Required | +| ---- | ----------- | -------- | +| `action` | Accepted values are `propose`, `decline` and `accept`. | Yes | + +## Usage + +### Propose a take back + +```js +ws.send('/takeback propose'); +``` + +```text +{ + "/takeback": "propose" +} +``` + +### Decline a take back + +```js +ws.send('/takeback decline'); +``` + +```text +{ + "/takeback": "decline" +} +``` + +### Accept a take back + +```js +ws.send('/takeback accept'); +``` + +```text +{ + "/takeback": "accept" +} +``` diff --git a/mkdocs.yml b/mkdocs.yml index 7366bdce..a3d294da 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,6 +7,7 @@ pages: - /heuristics: heuristics.md - /undo: undo.md - /accept: accept.md + - /takeback: takeback.md - /draw: draw.md - /resign: resign.md - /restart: restart.md diff --git a/src/Command/TakebackCommand.php b/src/Command/TakebackCommand.php index 79ce8e06..13c66f68 100644 --- a/src/Command/TakebackCommand.php +++ b/src/Command/TakebackCommand.php @@ -17,7 +17,7 @@ class TakebackCommand extends AbstractCommand public function __construct() { $this->name = '/takeback'; - $this->description = 'Allows to manage a takeback.'; + $this->description = 'Allows to takeback a move.'; $this->params = [ // mandatory param 'action' => [