createChallenge関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Creates a challenge after validating its authored board, finite queue, goal, and witness.
インポート
import { createChallenge } from "@johnmorrisdotca/houseki/falling-triplets";
定義
function createChallenge(options: ChallengeOptions): GameState
引数
| 名前 | 型 | 説明 |
|---|---|---|
options | ChallengeOptions | Validated native creation, authored challenge, or environment options described by this signature. |
戻り値
GameState
Creates a challenge after validating its authored board, finite queue, goal, and witness.
例
import { createChallenge } from "@johnmorrisdotca/houseki/falling-triplets";
console.log(createChallenge({width:6,height:12,board:Array(72).fill(null),queue:[["red","green","blue"],["blue","red","green"]],goal:{type:"empty"}}).phase);falling出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。