mhogenso/Zuse — pull request #17 by pwightman (2013-11-21 03:37:58+00:00)
Title: New JSON for ball

Here's my proposal for the ball JSON. See the diff for the exact code, but here's the summary:

- We define a library method called `move` that takes in a direction (up right, down left, down, etc.) and a speed. We save that speed in a variable
- We hook into the collision event, which takes a `other_sprite` parameter, which is the `id` of the sprite it collided with. So we check if we collided with `paddle1` or `paddle2`, and if so, increase the speed by 2.

We'd also want to detect collisions with the walls but... I haven't thought of a good abstraction yet. Let me know what you guys think.