ohHellTrickWinnerfunction
Who takes a trick: the highest trump, or else the highest card of the suit led.
Import it
import { ohHellTrickWinner } from "@johnmorrisdotca/toranpu/oh-hell";
Definition
function ohHellTrickWinner(trick: readonly OhHellPlay[], trump: string): number
Parameters
| Name | Type | Description |
|---|---|---|
trick | readonly OhHellPlay[] | The cards and seats in the current trick. |
trump | string | The current trump suit. |
Returns
number
Who takes a trick: the highest trump, or else the highest card of the suit led.
Examples
import { ohHellTrickWinner } from "@johnmorrisdotca/toranpu/oh-hell";
console.log(ohHellTrickWinner([{ seat: 0, card: "AH" }, { seat: 1, card: "KS" }, { seat: 2, card: "TH" }, { seat: 3, card: "QC" }], "S"));1What it prints (run when this page was built)