< |
|
Your goal in Milestone #2 is to display the
paddle at the bottom of the window and then get it to move along with
the x-coordinate of the mouse. The important subtasks are:
- Add a
GRect at the bottom of the window to serve as the
paddle.
The paddle should initially be centered horizontally on the canvas.
- Add a mouse listener that resets the location of the paddle whenever the
mouse moves.
This listener should ignore the y coordinate and make sure that the
center of the paddle tracks the x coordinate.
- Add the code necessary to ensure that the paddle never moves past
the boundaries of the canvas.
|
> |