heartsWinnersfunction
The lowest score wins; level on the lowest shares it.
Import it
import { heartsWinners } from "@johnmorrisdotca/toranpu/hearts";
Definition
function heartsWinners(game: HeartsGame): number[]
Parameters
| Name | Type | Description |
|---|---|---|
game | HeartsGame | The current native game; applying a move returns a new state. |
Returns
number[]
The lowest score wins; level on the lowest shares it.
Examples
import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu";
import { heartsWinners } from "@johnmorrisdotca/toranpu/hearts";
const names = Array.from({ length: CARD_GAME_TABLES.hearts.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`);
let game = newGame("hearts", { players: names, seed: 42 })!;
console.log(heartsWinners(game));[]What it prints (run when this page was built)