Fixed turning multiple times within one step

@alex5imon This fix stops multiple direction changes within one *step*. The global flag **set** is cleared during the **update()** of the *gameloop*, which is triggered at the end of the step. The flag is also set when a direction change has successfully happened.