Reference · Tiles, layouts and deals
arrangeTilesfunction
The tiles in an order, as a new list; see arrangeIndexes for what each order is.
Import it
import { arrangeTiles } from "@johnmorrisdotca/jarajara";
Definition
function arrangeTiles(codes: readonly string[], order?: TileOrder): string[]
Parameters
| Name | Type | Description |
|---|---|---|
codes | readonly string[] | The tile face codes in current order. |
order (optional) | TileOrder | The native tile sorting mode. |
Returns
string[]
The tiles in an order, as a new list; see arrangeIndexes for what each order is.
Examples
import { arrangeTiles } from "@johnmorrisdotca/jarajara";
console.log(arrangeTiles(["F","a","b"],"suit"));[ 'a', 'b', 'F' ]What it prints (run when this page was built)