04-12-2010, 07:55 PM
Ok I would suggest having a Boolean variable to see whether you can move or not, then have each of the "while [key] is pressed do" include an "if" statement to test whether the car can be moved.
Then you can do what shaydon suggested, only include at the beginning of the method a statement that changes the variable value.
|