Initial commit
This commit is contained in:
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* Command-line interface for running the interactive fiction game
|
||||
*/
|
||||
export declare class GameRunner {
|
||||
private engine;
|
||||
private llmProvider;
|
||||
private rl;
|
||||
private gameContext;
|
||||
private gameHistory;
|
||||
private suggestedCommands;
|
||||
constructor();
|
||||
/**
|
||||
* Initialize the game
|
||||
*/
|
||||
initialize(worldPath: string): Promise<void>;
|
||||
/**
|
||||
* Start the game in CLI mode
|
||||
*/
|
||||
start(): Promise<void>;
|
||||
/**
|
||||
* The main game loop for CLI mode
|
||||
*/
|
||||
private gameLoop;
|
||||
/**
|
||||
* Process a player command and return the narrative response
|
||||
* Used by both CLI and web interfaces
|
||||
*/
|
||||
processCommand(input: string): Promise<string>;
|
||||
/**
|
||||
* End the game
|
||||
*/
|
||||
end(): void;
|
||||
/**
|
||||
* Update the game context with new narrative
|
||||
*/
|
||||
private updateGameContext;
|
||||
/**
|
||||
* Get the current game state
|
||||
* Used by web interface
|
||||
*/
|
||||
getGameState(): {
|
||||
world: import("../interfaces/world-model").WorldModel;
|
||||
currentRoomId: string;
|
||||
inventory: string[];
|
||||
visitedRooms: string[];
|
||||
flags: Record<string, boolean>;
|
||||
counters: Record<string, number>;
|
||||
};
|
||||
/**
|
||||
* Get the current room description
|
||||
* Used by web interface
|
||||
*/
|
||||
getCurrentRoomDescription(): string;
|
||||
/**
|
||||
* Get suggested actions for the current game state
|
||||
* Used by web interface
|
||||
*/
|
||||
getSuggestions(): string[];
|
||||
/**
|
||||
* Load a saved game state
|
||||
* Used by web interface
|
||||
*/
|
||||
loadGameState(savedState: any): void;
|
||||
}
|
||||
Reference in New Issue
Block a user