Add move function to game loop