Exit mid-game using ESC
Cause repaint to happen in the event loop thread
Corrected comment
Synchronise thread access to direction variables