Added max turns check

Add initial check for maximum number of turns.
Currently only ends the program if the number of moves is 25.

I am not sure if this is the correct number of moves, or the correct location to put this code.