+ {/* HUD */}
+
+
+ {Array.from({ length: TOTAL_LIVES }, (_, i) => (
+
+ ♥
+
+ ))}
+
+
+
+ Score:{" "}
+ {score}
+
+
+
+ Best: {highScore}
+
+
+
+ {/* Game canvas + overlays */}
+
+
+
+ {/* Idle overlay */}
+ {phase === "idle" && (
+
+
+
+ BRICK BREAKER
+
+
+ Clear all the bricks!
+
+
+
+ ◄ ► Arrow keys to move • SPACE to launch
+
+
+
+ )}
+
+ {/* Ball-lost overlay */}
+ {phase === "ball-lost" && (
+
+
+
+ Ball Lost!
+
+
+ {lives} {lives === 1 ? "life" : "lives"} remaining
+
+
+
or press SPACE
+
+
+ )}
+
+ {/* Game-over overlay */}
+ {phase === "game-over" && (
+
+
+
+ GAME OVER
+
+
Score: {score}
+
Best: {highScore}
+
+
or press SPACE
+
+
+ )}
+
+ {/* Win overlay */}
+ {phase === "won" && (
+
+
+
+ 🎉 YOU WIN!
+
+
Score: {score}
+
Best: {highScore}
+
+
or press SPACE
+
+
+ )}
+
+
+ {/* Instructions */}
+
+
◄ ► Arrow keys to move paddle • SPACE to launch ball
+
3 lives • clear all bricks to win
+
+
+ );
+}
diff --git a/src/components/Home.tsx b/src/components/Home.tsx
index efd120c..cfa0d97 100644
--- a/src/components/Home.tsx
+++ b/src/components/Home.tsx
@@ -4,9 +4,10 @@ interface HomeProps {
onPlayTetris?: () => void;
onPlayFlappy?: () => void;
onPlayMinesweeper?: () => void;
+ onPlayBrickBreaker?: () => void;
}
-function Home({ onPlaySnake, onPlay2048, onPlayTetris, onPlayFlappy, onPlayMinesweeper }: HomeProps) {
+function Home({ onPlaySnake, onPlay2048, onPlayTetris, onPlayFlappy, onPlayMinesweeper, onPlayBrickBreaker }: HomeProps) {
return (
@@ -225,6 +226,43 @@ function Home({ onPlaySnake, onPlay2048, onPlayTetris, onPlayFlappy, onPlayMines
+
+ {/* Brick Breaker Cabinet */}
+