longestSuit関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The suit this hand holds most of, eights aside; clubs first among equals so the choice is always the same.
インポート
import { longestSuit } from "@johnmorrisdotca/toranpu/crazy-eights";
定義
function longestSuit(hand: readonly CardId[]): CardSuit
引数
| 名前 | 型 | 説明 |
|---|---|---|
hand | readonly string[] | The player’s held cards, or the hand number for a deal. |
戻り値
CardSuit
The suit this hand holds most of, eights aside; clubs first among equals so the choice is always the same.
例
import { longestSuit } from "@johnmorrisdotca/toranpu/crazy-eights";
console.log(longestSuit(["AS", "2S", "KH"]));S出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。