Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package uk.co.samatkins.racing.drivers;
- import uk.co.samatkins.racing.Car;
- import uk.co.samatkins.racing.Move;
- public interface Driver {
- /**
- * Tell this Driver to control the given car.
- * @param car - The Car this Driver controls
- */
- public void setCar(Car car);
- /**
- * Tell this Driver to start calculating its next move.
- *
- * AI drivers should start a thread for this, whereas a player
- * one should enable the UI.
- */
- public void calculateMove();
- /**
- * @return Whether this Driver is ready to make a move this turn.
- */
- public boolean isReady();
- /**
- * @return The Move for this turn.
- */
- public Move getMove();
- /**
- * Called each physics step. Should just update the car's steering
- * braking and acceleration with the Move's values.
- */
- public void drive();
- }
Advertisement
Add Comment
Please, Sign In to add comment