Reference · Rules, maps and records
finishedfunction
The game ended, with these seats winning.
Import it
import { finished } from "@johnmorrisdotca/tenka";
Definition
function finished(game: TenkaGame, winners: readonly TenkaSeat[]): TenkaGame
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
winners | readonly number[] | The seat indices declared winners. |
Returns
TenkaGame
The game ended, with these seats winning.
Examples
import { finished, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(finished(game,[0]).winners);[ 0 ]What it prints (run when this page was built)