feat: implement complete score tracking system
- Track score (starts at 0) - +1 score and +1 correct for each correct character typed - -1 score and +1 missed for each wrong character typed - +1 deaths for each collision with ship - Score resets when game starts - All metrics exposed through ScoreManager - Updated example app UI with colorful scoreboard showing: - Time (gray) - Score (neutral) - Correct (green) - Missed (yellow) - Deaths (red) - Keystrokes (neutral) - Uses grid layout for organized metric display - Score cannot go below 0 (clamped to minimum)
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "cd example && bun run dev",
|
||||
"build": "tsc --outDir dist --declaration --emitDeclarationOnly false && node -e \"const fs = require('node:fs'); fs.mkdirSync('dist', { recursive: true }); fs.copyFileSync('src/game.css', 'dist/game.css'); fs.copyFileSync('package.json', 'dist/package.json');\"",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user