Level 14: Testing and Polish
User Story: As a developer, I want to test my game thoroughly so that I can ensure it works perfectly.
What You’ll Do
Perform comprehensive testing and add any final improvements.
Instructions
- Test all game mechanics:
- Clicking the apple increases score
- Missing decreases lives
- Apple changes size randomly
- Apple moves to random positions
- Stats bar changes colors
- Win condition triggers at 100
- Test edge cases:
- What happens if lives reach 0? (Currently nothing - this is okay)
- Can you click past 100 points? (No - game ends)
- Do small apples still work?
- Check styling:
- Is everything centered properly?
- Are colors readable?
- Does the layout look good?
- Consider improvements:
- Add a “Game Over” condition when lives = 0
- Add a reset button
- Add sound effects
- Track high score
💡 Code Hints
Need help with testing? Check out these tips:
Testing Checklist:
Common Issues:
- If clicks don’t work: Check
onClick handlers
- If state doesn’t update: Check
setState calls
- If styling is broken: Check CSS class names
- If images don’t load: Check file paths
✅ Check
- Run through the complete game at least twice
- Try to break it with rapid clicks
- Test with very small apples (harder to click)
- Verify win condition works consistently
- Check browser console for any errors
- Test in different browsers if possible