you have to make the angle+1 conditional, by setting a condition variable to false when you detect the keypress 0.