- Implement collision detection using distance formula
- Display and update score
- NEW: Introduce try/except error handling
- Use lists for object positions
try:
# Code that might cause errors
result = risky_operation()
except Exception as e:
# What to do if error occurs
print(f"Error: {e}")Why? Games should keep running even if something unexpected happens!
- Warm-up (10 min): Review distance formula from math
- Teach (15 min): Collision detection, try/except basics
- Build (20 min): Implement collection game with scoring
- Challenge (15 min): Multiple stars, different point values
- Working collision detection
- Score updates when collecting stars
- Understanding of try/except purpose