feat: implement falling letters spawning from top
- Letters spawn at random horizontal positions every 1 second - Letters fall at 100px/second from top to bottom - Random A-Z letters rendered in white monospace font - Fix game loop to start properly when startGame called - Remove letters that exit bottom of screen
This commit is contained in:
+4
-4
@@ -19,11 +19,11 @@ export const getGamePhase = (status: GameStatus): GamePhase =>
|
||||
// ============================================================================
|
||||
|
||||
export type PlayerPosition = { x: number }; // 0-9 for 10 columns
|
||||
export type Word = {
|
||||
export type FallingLetter = {
|
||||
id: string;
|
||||
text: string;
|
||||
x: number; // 0-9 column position
|
||||
y: number; // vertical position (0 = top, increases downward)
|
||||
letter: string;
|
||||
x: number; // 0-800 pixel position
|
||||
y: number; // 0-600 pixel position
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user