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