ginWinnersfunction
The first to the game's total wins.
Import it
import { ginWinners } from "@johnmorrisdotca/toranpu/gin-rummy";
Definition
function ginWinners(game: GinGame): number[]
Parameters
| Name | Type | Description |
|---|---|---|
game | GinGame | The current native game; applying a move returns a new state. |
Returns
number[]
The first to the game's total wins.
Examples
import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu";
import { ginWinners } from "@johnmorrisdotca/toranpu/gin-rummy";
const names = Array.from({ length: CARD_GAME_TABLES.ginRummy.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`);
let game = newGame("ginRummy", { players: names, seed: 42 })!;
console.log(ginWinners(game));[]What it prints (run when this page was built)