Added king state check at the end of the move