checkMate method helper function

-undo method would not work for checkMate
because the movehistory was not updated.
This undo function works without a movehistory array.