Along the horizontal axis, the car can move right, left, or not at all. To indicate these directions, create a Direction
enum with the following fields. RIGHT, LEFT, NONE.
The player's car must have a field that stores the direction of motion (Direction direction).
We'll access it through a getter
Racer (Part 9/28)
- 3
Locked
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Rithik Bhat
14 August 2020, 22:00
for the on keypress method int he RacerGame class it still says that my code is wrong for the last two conditions. Please help.
0
Roman
17 August 2020, 05:30
Please refer to Help section at our course.
0
Mike Taylor
9 February 2020, 01:13
All good except for increasing and decreasing x coordinate. Which variable holds this value?
0