bigTwoBeatsfunction
Whether a play beats the one on the table: the same number of cards, and stronger.
Import it
import { bigTwoBeats } from "@johnmorrisdotca/toranpu/big-two";
Definition
function bigTwoBeats(play: BigTwoValue, table: BigTwoValue): boolean
Parameters
| Name | Type | Description |
|---|---|---|
play | BigTwoValue | The player’s move or cards for this step. |
table | BigTwoValue | The shared table or laid cards. |
Returns
boolean
Whether a play beats the one on the table: the same number of cards, and stronger.
Examples
import { bigTwoBeats, bigTwoValue } from "@johnmorrisdotca/toranpu/big-two";
console.log(bigTwoBeats(bigTwoValue(["4D"])!, bigTwoValue(["3D"])!));trueWhat it prints (run when this page was built)