From 682bb14684d3d8be078029778e08ec2b48bae65e Mon Sep 17 00:00:00 2001
From: H.G. Muller
+Mate scores should be indicated as 100000 + N for "mate in N moves", +and -100000 - N for "mated in N moves". +
+Example:
diff --git a/engineoutput.c b/engineoutput.c index 75e1f8d..1ca977b 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -434,6 +434,7 @@ InsertionPoint (int len, EngineOutputData *ed) return offs + strlen(header[ed->which]); } +#define MATE_SCORE 100000 static char spaces[] = " "; // [HGM] align: spaces for padding static void @@ -590,6 +591,8 @@ UpdateControls (EngineOutputData *ed) if( h == 0 ) { snprintf( s_score, sizeof(s_score)/sizeof(s_score[0]), " 0.00%c\t", fail ); } else + if( h >= MATE_SCORE) snprintf(s_score, 16, " %s#%d%c\t", ( h > MATE_SCORE+9 ? "" : " "), h - MATE_SCORE, fail ); else + if(-h >= MATE_SCORE) snprintf(s_score, 16, " %s#-%d%c\t", (-h > MATE_SCORE+9 ? "" : " "), -h - MATE_SCORE, fail ); else if( h > 0 ) { snprintf( s_score, sizeof(s_score)/sizeof(s_score[0]), "+%.2f%c\t", h / 100.0, fail ); } -- 1.7.0.4