Move game loop to function