Skip to content

jalapeno-73198: Wallet balance on scorecard#4

Draft
snackman wants to merge 22 commits intomainfrom
jalapeno-73198-wallet-scorecard
Draft

jalapeno-73198: Wallet balance on scorecard#4
snackman wants to merge 22 commits intomainfrom
jalapeno-73198-wallet-scorecard

Conversation

@snackman
Copy link
Owner

@snackman snackman commented Feb 3, 2026

Adds tracking for total earned and total spent money, displays on game over scorecard.

Changes

  • Added totalEarned and totalSpent to GameStats
  • Track earnings when serving customers and from moltobenny
  • Track spending on all store purchases
  • Display wallet stats (Balance, Earned, Spent) in green on scorecard

snackman and others added 22 commits January 9, 2026 05:32
- Created powerUpSystem.ts with power-up collection, expiration, and star power logic
- Created nyanSystem.ts with sweep movement and collision detection
- Added unit tests for both systems
- Integrated new systems into useGameLogic.ts
- Completed Phases 1-3 of refactoring plan:
  - Phase 1: Scoring System ✅
  - Phase 2: Collision System ✅
  - Phase 3: Power-Up System ✅
- Removed unused Landscape components
- Various other improvements and cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…alert

- Add pizza confetti animation when score makes top 10 leaderboard
- Add checkIfTopScore function to verify leaderboard placement
- Refresh leaderboard automatically after top 10 submission
- Disable tap/click controls on game board (keep mobile buttons)
- Reduce doge alert to 1/3 size on mobile devices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed cook time mismatch in MobileGameControls (was [3000,2000,1000,500], now correct)
- Created getOvenDisplayStatus() shared utility in ovenSystem.ts
- Both GameBoard and MobileGameControls now use consistent oven logic
- Updated refactorplan.md with v2 plan:
  - Phase 1: Boss, Spawn, Plate system extraction
  - Phase 2: Power-up consolidation
  - Phase 3: Customer type refactor
  - Phase 4: Modal state cleanup
  - Phase 5: Constants cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract bossSystem.ts (331 lines): Boss battles, minions, waves, collisions
- Extract spawnSystem.ts (141 lines): Customer and power-up spawn logic
- Extract plateSystem.ts (80 lines): Plate movement and catching
- Reduce useGameLogic.ts from 1045 to 923 lines (-122 lines)
- Update refactorplan.md with progress

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2: Power-up consolidation
- Remove unused checkStarPowerAutoFeed() function
- Consolidate debugActivatePowerUp to use processPowerUpCollection
- Reduce useGameLogic.ts from 923 to 883 lines (-40)
- Reduce powerUpSystem.ts from 173 to 147 lines (-26)

Doge alert:
- Use sprite() pattern instead of imgur URL
- Reference cropped image without "for 5 seconds!" text

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Critics now display "Just plain, thanks." and are unaffected by hot honey.
Updated both powerUpSystem.ts (initial application) and customerSystem.ts
(ongoing effect checks).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Scumbag Steve as new customer type with lane-changing, 2-slice requirement,
  angled plate throws, and no bank payment
- Add Clean Kitchen Bonus (1000 pts) for 30 seconds without burnt ovens or plate breaks
- Make special customers (Brian, Steve) keep base images regardless of powerup effects
- Fix Molto Benny confetti trigger for tied high scores
- Allow critics to trigger 8th customer star bonus
- Add floating star indicators for star gains/losses
- Add favicon and apple touch icon
- Various sound and UI improvements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Papa John boss at level 10: 40 slices to defeat, cycles through 6 sprites
- Clean kitchen timer pauses when game is paused
- Fix Scumbag Steve flip behavior (spawn normal, flip when leaving)
- Extract magic numbers to NYAN_CONFIG, TIMINGS, LAYOUT constants
- Create applyCustomerScoring helper to dedupe 6 repeated scoring blocks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add useMenuKeyboardNav hook for reusable keyboard navigation
- Create PauseMenu component with arrow key + Enter navigation
- Add keyboard nav to Item Store with smart grid navigation
  - Skips disabled buttons
  - Context-aware navigation based on bank balance
- Add keyboard nav to Game Over Screen buttons
- Add Escape/Enter/Space to close Controls Overlay
- Add Enter/Escape to close High Scores view with highlighted Back button
- Replace all imgur image URLs with sprite() calls
- Add desktop GitHub and Sheets icons during gameplay

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Pepe power-up with Franco-Pepe and Frank-Pepe helpers
- Helpers are independent chefs that move between lanes
- They start with 4 slices, use ovens, serve customers, catch plates
- Helpers last 8 seconds and act every 100ms
- Papa John now runs all over the game board (not just right side)
- Fix Item Store navigation to check other column when going up/down

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Only Enter key now triggers menu selections and closes overlays.
Space bar still works for gameplay (using ovens).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pizza slices now only register hits when they collide with
non-transparent parts of Papa John's sprite.

- Added bossCollisionMasks.ts to load pre-generated mask JSON files
- Updated bossSystem.ts to check collision against sprite alpha mask
- Masks are loaded at game start (fire and forget)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Browser default behavior triggers button click on space bar.
Added onKeyDown handler to prevent this on menu items.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Boss position is left edge, not center. Fixed normalizedX/Y mapping
to correctly align slice position with sprite mask coordinates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bossPosition is left edge, not center. Updated bounding box check
to use center (bossPosition + 12) for proper collision detection
across the full 24% width.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added capture-phase event listener that prevents space bar
from triggering the browser's default button click behavior
on all buttons throughout the app.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previous approach checking button targets wasn't working reliably.
Now tracks all menu/overlay states and blocks space bar whenever
any menu is showing (splash, pause, game over, store, etc.).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Helpers now check how many slices are already in flight toward
a lane before throwing more. Only throws if customers > slices.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add compact mode to ScoreBoard for landscape (reduced vertical padding)
- Reduce gameboard reserved space from 60px to 36px in landscape
- Add useAssetPreloader hook for preloading game assets
- Show loading progress on splash screen

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Track totalEarned when serving customers and moltobenny
- Track totalSpent on store purchases
- Display Balance, Earned, Spent on game over scorecard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant