Hook up the game loop