Chapter 3: Collisions - hpi-swa-teaching/InteractivePongTutorial GitHub Wiki
Level 01: Ball Player Collision
- newly visible classes / methods
- IPTBall
- checkCollisionWithPlayer
- step
- IPTGame
- initlial state
- explain/tips
- add check in step
- playerBounds: returns list of players bounds
- checkCollisionWithPlayer: check for every playerBounds: if it intersects with own bounds, turnHorizontal.
- explain bounds and intersects
(Level 02: Ball Player Collision bug: sideways collide makes ball gitter in player)