}
root_turn = Flip( root_turn );
+ move_list[move_ptr++] = move; // [HGM] undo: remember all moves played in root
/* detect checkmate */
if ( check && is_mate( ptree, 1 ) ) { game_status |= flag_mated; }
root_nrep -= 1;
game_status &= ~( flag_drawn | flag_mated );
root_turn = Flip(root_turn);
+ move_ptr--; // [HGM] undo: clip last move off game history
ptree->save_material[1] = ptree->save_material[0];
UnMakeMove( root_turn, move, 1 );