Build Retur dead-letter sorting game
This commit is contained in:
39
src/types.ts
Normal file
39
src/types.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
export type Route = 'deliver' | 'return' | 'archive' | 'quarantine';
|
||||
|
||||
export interface Letter {
|
||||
id: string;
|
||||
day: number;
|
||||
sender: string;
|
||||
recipient: string;
|
||||
address: string;
|
||||
postmark: string;
|
||||
body: string;
|
||||
marks: string[];
|
||||
correctRoute: Route;
|
||||
explanation: string;
|
||||
}
|
||||
|
||||
export interface Regulation {
|
||||
id: string;
|
||||
fromDay: number;
|
||||
number: string;
|
||||
text: string;
|
||||
note?: string;
|
||||
}
|
||||
|
||||
export interface Decision {
|
||||
letterId: string;
|
||||
route: Route;
|
||||
correct: boolean;
|
||||
}
|
||||
|
||||
export interface GameState {
|
||||
phase: 'intro' | 'playing' | 'day-end' | 'won' | 'lost';
|
||||
day: number;
|
||||
letterIndex: number;
|
||||
accuracy: number;
|
||||
composure: number;
|
||||
suspicion: number;
|
||||
decisions: Decision[];
|
||||
lastDecision: Decision | null;
|
||||
}
|
||||
Reference in New Issue
Block a user