cbt-game-engine
Version:
Platform-agnostic game engine for Interactive Autism Quiz Game
20 lines (19 loc) • 697 B
TypeScript
import { GameConfig, GameState, GameCallbacks, PlatformServices, GameProgress, GameSegment } from '../types';
export declare const useGameEngine: (config: GameConfig, callbacks: GameCallbacks, platformServices: PlatformServices) => {
getCurrentSegment: () => GameSegment;
startSegment: () => void;
nextSegment: () => void;
resetGame: () => void;
skipSegment: () => void;
canStartSegment: boolean;
canNextSegment: boolean;
isGameComplete: boolean;
hasError: boolean;
gameState: GameState;
currentSegment: number;
timeLeft: number;
progress: GameProgress;
isAudioPlaying: boolean;
isMicrophoneActive: boolean;
error: string | null;
};