slideWordfunction
A slide as the draughts records write it: square to square with an arrow, a
capture with a colon (g5:e3), and a multi-jump as every square it landed on
(g5:e3:c1). The colon is the draughts convention vint.ee and Russian
notation use; pdn.ts writes a file's own separators.
Import it
import { slideWord } from "@johnmorrisdotca/narabe";
Definition
function slideWord(squares: readonly string[], capture: boolean): string
Parameters
| Name | Type | Description |
|---|---|---|
squares | readonly string[] | The square names along a move or capture chain. |
capture | boolean | Whether to join squares with capture separators. |
Returns
string
A slide as the draughts records write it: square to square with an arrow, a capture with a colon (g5:e3), and a multi-jump as every square it landed on (g5:e3:c1). The colon is the draughts convention vint.ee and Russian notation use; pdn.ts writes a file's own separators.
Examples
import { slideWord } from "@johnmorrisdotca/narabe";
console.log(slideWord(["a3","c5"],true));a3:c5What it prints (run when this page was built)