X-Git-Url: http://winboard.nl/cgi-bin?p=bonanza.git;a=blobdiff_plain;f=next.c;h=a6937a364d8d2e84374a947b39e0c1190bf50467;hp=f0153ac2ab2603320c8c05994672f322daf1ef02;hb=cygwin;hpb=18b507e1b20fc6c32ee50f00fb910a59110c1a1d diff --git a/next.c b/next.c index f0153ac..a6937a3 100644 --- a/next.c +++ b/next.c @@ -3,7 +3,7 @@ #include #include "shogi.h" -int +int CONV gen_next_move( tree_t * restrict ptree, int ply, int turn ) { switch ( ptree->anext_move[ply].next_phase ) @@ -163,6 +163,7 @@ gen_next_move( tree_t * restrict ptree, int ply, int turn ) ibest = -1; ptree->move_last[ply] = GenNoCaptures( turn, ptree->move_last[ply] ); ptree->move_last[ply] = GenDrop( turn, ptree->move_last[ply] ); + n = (int)( ptree->move_last[ply] - ptree->anext_move[ply].move_last ); pmove = ptree->anext_move[ply].move_last; for ( i = 0; i < n; i++ ) @@ -260,7 +261,7 @@ gen_next_move( tree_t * restrict ptree, int ply, int turn ) } -int +int CONV gen_next_evasion( tree_t * restrict ptree, int ply, int turn ) { switch ( ptree->anext_move[ply].next_phase ) @@ -345,7 +346,7 @@ gen_next_evasion( tree_t * restrict ptree, int ply, int turn ) { if ( *( ptree->anext_move[ply].move_last ) ) { - ptree->current_move[ply] = *(ptree->anext_move[ply].move_last++); + MOVE_CURR = *(ptree->anext_move[ply].move_last++); return 1; } ptree->anext_move[ply].move_last++;