SwapActiontype
Swaps two row-major cell addresses.
Import it
import type { SwapAction } from "@johnmorrisdotca/houseki/gem-swap";
Definition
interface SwapAction {
readonly kind: 'swap';
readonly from: number;
readonly to: number;
}
Members
| Name | Type | Description |
|---|---|---|
kind | "swap" | |
from | number | |
to | number |
Examples
import type { SwapAction } from "@johnmorrisdotca/houseki/gem-swap";
const value: SwapAction = {kind:"swap",from:0,to:1};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'kind', 'from', 'to' ]What it prints (run when this page was built)