X-Git-Url: http://winboard.nl/cgi-bin?p=bonanza.git;a=blobdiff_plain;f=makemove.c;h=7ed2b7d3720dab3ff04f2f44f6795375513a6fd1;hp=83d8c9ec01103fc5be27d87cd1fa9cc35136649b;hb=HEAD;hpb=18b507e1b20fc6c32ee50f00fb910a59110c1a1d diff --git a/makemove.c b/makemove.c index 83d8c9e..7ed2b7d 100644 --- a/makemove.c +++ b/makemove.c @@ -421,6 +421,7 @@ make_move_root( tree_t * restrict ptree, unsigned int move, int flag ) } 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; } @@ -500,6 +501,7 @@ unmake_move_root( tree_t * restrict ptree, unsigned int move ) 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 );