X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=hachu.c;h=6b8f54240ce185722d49240d9fe50c52cf7760a3;hb=3b48f19d9f6f6d04c0ebd02c08ed5c98df98b85e;hp=7a6dccc58358fb8aec9220ee149d0cb07bd402a5;hpb=4f353c90e7676e1c17760bb00dd7517dde67cbfa;p=hachu.git diff --git a/hachu.c b/hachu.c index 7a6dccc..6b8f542 100644 --- a/hachu.c +++ b/hachu.c @@ -11,7 +11,7 @@ // promotions by pieces with Lion power stepping in & out the zone in same turn // promotion on capture -#define VERSION "0.1beta" +#define VERSION "0.4beta" #define PATH level==0 || path[0] == 0xc4028 && (level==1 /*|| path[1] == 0x75967 && (level == 2 || path[2] == 0x3400b && (level == 3))*/) //define PATH 0 @@ -1990,6 +1990,7 @@ MapFromScratch(attacks); if((moveStack[i] & (PROMOTE | DEFER-1)) == ret) break; if((moveStack[i] & DEFER-1) == ret) deferred = i; // promoted version of entered non-promotion is legal } +printf("# moveNr = %d in {%d,%d}\n", i, retFirst, retMSP); if(i>=retMSP) { // no exact match if(deferred) { // but maybe non-sensical deferral int flags = p[board[f]].promoFlag; @@ -2134,6 +2135,7 @@ printf("# setup done");fflush(stdout); if(stm == engineSide) { // if it is the engine's turn to move, set it thinking, and let it move +pboard(board); score = SearchBestMove(stm, timeLeft, mps, timeControl, inc, timePerMove, &move, &ponderMove); if(move == INVALID) { // game apparently ended @@ -2180,8 +2182,6 @@ printf("# setup done");fflush(stdout); // wait for input, and read it until we have collected a complete line for(i = 0; (inBuf[i] = getchar()) != '\n'; i++); inBuf[i+1] = 0; -pboard(board); -pmoves(retFirst, retMSP); // extract the first word sscanf(inBuf, "%s", command); @@ -2219,7 +2219,6 @@ printf("in: %s\n", command); for(i=0; i<5; i++) { sscanf(inBuf+8, "%s", command); if(!strcmp(variants[i].name, command)) { -printf("var %d\n",i); Init(i); stm = Setup2(NULL); break; } } @@ -2265,6 +2264,7 @@ printf("var %d\n",i); if(!strcmp(command, "")) { continue; } if(!strcmp(command, "usermove")){ int move = ParseMove(inBuf+9); +pboard(board); if(move == INVALID) { if(reason) printf("Illegal move {%s}\n", reason); else printf("%s\n", reason="Illegal move"); if(comp) PrintResult(stm, -INF); // against computer: claim