new Collision(p_walls, p_paddles)
The main method
handleCollision detects collisions
between the paddle and a wall.
This:
Parameters:
| Name | Type | Description |
|---|---|---|
p_walls |
Object | The walls of the game: An object with
four integer attributes: left,
right, top, and
bottom. |
p_paddles |
Paddle | The paddles of the game. |
- Source:
Methods
-
handleCollision()
-
Detects collisions between the paddle and a wall, between the paddle and the wall, and between the paddle and the paddle. If a collision is detected, the collision is handled.
- Source: