chore: remove unused api
This commit is contained in:
parent
6352977791
commit
83658c9898
|
|
@ -16,7 +16,6 @@ export interface IGameContext<TState extends Record<string, unknown> = {} > {
|
||||||
run<T>(input: string): Promise<CommandResult<T>>;
|
run<T>(input: string): Promise<CommandResult<T>>;
|
||||||
runParsed<T>(command: Command): Promise<CommandResult<T>>;
|
runParsed<T>(command: Command): Promise<CommandResult<T>>;
|
||||||
prompt: <TResult,TArgs extends any[]=any[]>(def: PromptDef<TArgs>, validator: PromptValidator<TResult,TArgs>, currentPlayer?: string | null) => Promise<TResult>;
|
prompt: <TResult,TArgs extends any[]=any[]>(def: PromptDef<TArgs>, validator: PromptValidator<TResult,TArgs>, currentPlayer?: string | null) => Promise<TResult>;
|
||||||
addInterruption(promise: Promise<void>): void;
|
|
||||||
|
|
||||||
// test only
|
// test only
|
||||||
_state: MutableSignal<TState>;
|
_state: MutableSignal<TState>;
|
||||||
|
|
@ -50,9 +49,6 @@ export function createGameContext<TState extends Record<string, unknown> = {} >(
|
||||||
prompt(def, validator, currentPlayer) {
|
prompt(def, validator, currentPlayer) {
|
||||||
return commands.prompt(def.schema, validator, currentPlayer);
|
return commands.prompt(def.schema, validator, currentPlayer);
|
||||||
},
|
},
|
||||||
addInterruption(promise) {
|
|
||||||
state.addInterruption(promise);
|
|
||||||
},
|
|
||||||
|
|
||||||
_state: state,
|
_state: state,
|
||||||
_commands: commands,
|
_commands: commands,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import {
|
import {
|
||||||
createGameCommandRegistry, Part, createRegion,
|
createGameCommandRegistry, Part, createRegion,
|
||||||
IGameContext
|
IGameContext, createPromptDef
|
||||||
} from '@/index';
|
} from '@/index';
|
||||||
import {createPromptDef} from "@/core/game";
|
|
||||||
|
|
||||||
const BOARD_SIZE = 3;
|
const BOARD_SIZE = 3;
|
||||||
const MAX_TURNS = BOARD_SIZE * BOARD_SIZE;
|
const MAX_TURNS = BOARD_SIZE * BOARD_SIZE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue