stackUpWinnersfunction
The seats that won a game that is over: the one who emptied their stock, or at a stuck table those with the fewest cards left; empty while it is being played.
Import it
import { stackUpWinners } from "@johnmorrisdotca/toranpu/stack-up";
Definition
function stackUpWinners(game: StackUpGame): number[]
Parameters
| Name | Type | Description |
|---|---|---|
game | StackUpGame | The current native game; applying a move returns a new state. |
Returns
number[]
The seats that won.
Examples
import { stackUpWinners, startStackUp } from "@johnmorrisdotca/toranpu/stack-up";
console.log(stackUpWinners(startStackUp(15, ["Aki", "Ben"], undefined, 42)!));[]What it prints (run when this page was built)