Reference · Game engine and table
hitotsuTopfunction
The top card of the discard pile.
Import it
import { hitotsuTop } from "@johnmorrisdotca/hitotsu";
Definition
function hitotsuTop(game: HitotsuGame): HitotsuCard
Parameters
| Name | Type | Description |
|---|---|---|
game | HitotsuGame | The current native game; it is left unchanged. |
Returns
string
The top card of the discard pile.
Examples
import { HITOTSU_CLASSIC, hitotsuTop, startHitotsu } from "@johnmorrisdotca/hitotsu";
const game = startHitotsu(1, ["Aki", "Ben"], 42, HITOTSU_CLASSIC, [true, true])!;
console.log(hitotsuTop(game));Y70What it prints (run when this page was built)