From a1b49a22d4f243c8bda00c3f630dbabac8508b15 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 11 Feb 2013 22:38:13 +0100 Subject: [PATCH] Remove under-promotion resign This was legacy code from micro-Max, and is no longer used, as Fairy-Max allows the opponent every under-promotion. --- fairymax.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/fairymax.c b/fairymax.c index a78c851..cf62466 100644 --- a/fairymax.c +++ b/fairymax.c @@ -98,7 +98,6 @@ int MovesLeft; int MaxDepth; int Post; int Fifty; -int UnderProm; int GameNr; int Resign; int Cambodian; @@ -404,7 +403,7 @@ void InitGame() if(w[oo[i]] < 0) k = w[oo[i]]; } R -= 2*(-k/FAC); - UnderProm = -1; pl[WHITE] = pl[BLACK] = 2*BW; + pl[WHITE] = pl[BLACK] = 2*BW; pm = !pl[BLACK+7] && pl[BLACK+9] && pl[WHITE+7] ? 2 : 0; // Unlike white, black has no 'Q', so promote to 9, which he does have. if(gating) pl[14] = pl[15] = pl[30] = pl[31] = 1, R += 2*(w[9]/FAC + w[10]/FAC); } @@ -572,12 +571,6 @@ int main(int argc, char **argv) N=0;K=I; if (D(Side,-I,I,Q,O,LL|S,3)==I) { Side ^= BLACK^WHITE; - if(UnderProm>=0 && UnderProm != L) - { printf("tellics I hate under-promotions!\n"); - printf("resign { underpromotion } \n"); - Computer = EMPTY; - continue; - } else UnderProm = -1; m = GetTickCount() - Ticks; printf("# times @ %u: real=%d cpu=%1.0f\n", m + Ticks, m, (CPUtime() - cpuT)/CLOCKS_PER_SEC); -- 1.7.0.4