+
WHACK-A-BUG
+
// blame the bugs for the error
+
+ {
+
+
+ {BUG_TYPES.map((b) => (
+
+ {b.icon}
+
+ ))}
+
+
+ You have {MAX_LIVES} lives. Bugs escape = lost life.
+
+ 30 seconds. Smash as many as you can.
+
+
+ }
+
+ {gameState === 'gameover' ? (
+
+
// GAME OVER — all bugs escaped
+
+
+ ) : (
+
+ )}
+
+ {gameState === 'playing' && (
+ <>
+
+
+ {Array.from({length: MAX_LIVES}).map((_, i) => (
+
+ ))}
+
+
+ TIME
+
+ {String(timeLeft).padStart(2, '0')}s
+
+
+
+
+
+
+
+ {holes.map((hole, i) => {
+ const holeEffects = effects.filter((e) => e.index === i)
+ return (
+
whack(i)}
+ >
+ {hole && (
+
+ {hole.type.icon}
+
+ )}
+ {holeEffects.map((ef) => (
+
+ ))}
+
+ )
+ })}
+
+ >
+ )}
+
+ >
+ )
+}
diff --git a/web/pages/whack-a-bug.tsx b/web/pages/whack-a-bug.tsx
new file mode 100644
index 00000000..718afbf7
--- /dev/null
+++ b/web/pages/whack-a-bug.tsx
@@ -0,0 +1,20 @@
+'use client'
+
+import WhackABug from 'web/components/game/whack-a-bug'
+import {PageBase} from 'web/components/page-base'
+import {SEO} from 'web/components/SEO'
+
+export default function WhackABugPage() {
+ return (
+