stackUpFits関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether a card may go on a building pile: a wild always, a number when it is the one the pile wants.
インポート
import { stackUpFits } from "@johnmorrisdotca/toranpu/stack-up";
定義
function stackUpFits(card: CardId, pile: readonly CardId[]): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
card | string | The card id to lay. |
pile | readonly string[] | The cards on the building pile. |
戻り値
boolean
Whether a card may go on a building pile.
例
import { stackUpFits } from "@johnmorrisdotca/toranpu/stack-up";
console.log(stackUpFits("n01", []));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。