Added a function to output move history.