moved the main gameloop to a common function and added possible numlock fix for unix