feat: implement sentences mode with centered text and slower speed

- Set sentence fall speed to 25 pixels/second
- Replace sentences with longer, realistic ones including commas and punctuation
- Sentences always render centered on screen (80% max width constraint)
- Ship stays centered during sentence mode (no horizontal movement)
- Add punctuation support (. , ! ?) to keyboard input
- Disable auto-tracking for sentence/paragraph modes
This commit is contained in:
2025-11-04 17:00:20 +00:00
parent 68078e1ec7
commit 166ccd7783
5 changed files with 46 additions and 25 deletions
+2 -2
View File
@@ -30,9 +30,9 @@ export const useKeyBindings = (gameManager: GameManager) => {
return;
}
// handle letter typing during game
// handle letter and punctuation typing during game
if (gameManager.gameStatus === "started") {
if (ev.key.length === 1 && /[a-zA-Z]/.test(ev.key)) {
if (ev.key.length === 1 && /[a-zA-Z.,!?]/.test(ev.key)) {
gameManager.handleTypedLetter(ev.key);
}
}