hidden-grid/types.ts

27 lines
539 B
TypeScript

export type CellType = 'safe' | 'wall' | 'trap' | 'start' | 'end';
export interface Position {
x: number;
y: number;
}
export interface GridCell {
x: number;
y: number;
type: CellType;
revealed: boolean;
steppedOn: boolean; // specific for showing path history faintly if needed
}
export enum GameState {
PLAYING = 'PLAYING',
WON = 'WON',
LOST = 'LOST', // Not strictly used since we reset on trap, but good for expansion
}
export enum Direction {
UP = 'UP',
DOWN = 'DOWN',
LEFT = 'LEFT',
RIGHT = 'RIGHT',
}