/** * WASM MCブリッジ * Rust WASM モジュールの初期化を担当 * スコア計算はRust内で完結(JSコールバック不要) */ import type { TileId } from "../core/tile.js"; import type { HandArray } from "../core/hand.js"; export interface MCResult { discard: TileId; shantenAfter: number; acceptCount: number; ev: number; winRate: number; avgPoints: number; } /** * WASM MC モジュールを初期化する * @param suitTable 数牌テーブル * @param honorTable 字牌テーブル * @param wasmUrl ブラウザ用: WASMバイナリのURL。指定時はfetchで非同期初期化。省略時はNode.jsファイル読み込み。 */ export declare function initMCWasm(suitTable: Int8Array, honorTable: Int8Array, wasmUrl?: string): Promise; /** * WASM MCが利用可能かどうか */ export declare function isWasmMCAvailable(): boolean; /** * WASM版simulateDiscardsを呼び出す */ export declare function wasmSimulateDiscards(hand: HandArray, remaining: HandArray, turnsLeft: number, numSims: number, useRiichi: boolean, seatWind: number, roundWind: number, doraIndicators: number[], useRedDora: boolean, initialRiichi: boolean, uraDoraCount: number, ronBonus: number): MCResult[];