From: H.G. Muller Date: Mon, 20 May 2013 10:59:47 +0000 (+0200) Subject: Implement Ai-Wok option in Makruk X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e5d8f9eaa9066ee587678aa88aef646e87bab756;p=fairymax.git Implement Ai-Wok option in Makruk The checkbox option to play Makruk with Cambodian rules is now replaced by a combobox that lets you choose between makruk, cambodian and ai-wok. The latter is given a new definition in the fmax.ini file. It is Makruk where the Met is replaced by an Ai-Wok piece (RNF). --- diff --git a/data/fmax.ini b/data/fmax.ini index 93e7f74..ab3e999 100644 --- a/data/fmax.ini +++ b/data/fmax.ini @@ -324,7 +324,7 @@ s:300 15,7 17,7 -15,7 -17,7 16,7 n:450 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7 R:630 1,3 16,3 -1,3 -16,3 -// Thai Chess. Note: value m = 181 controls promotion at 6th! +// Thai Chess. Game: makruk 8x8=3 12 11 8 7 3 8 11 12 @@ -361,6 +361,20 @@ b:300 15,7 17,7 -15,7 -17,7 16,7 n:450 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7 R:630 1,3 16,3 -1,3 -16,3 +// Thai Chess variant with Ai-Wok (RNF). +Game: ai-wok +8x8=3 +6 5 3 8 7 3 5 6 +6 5 4 7 8 4 5 6 +p:100 -16,6 -15,5 -17,5 +p:100 16,6 15,5 17,5 +s:300 15,7 17,7 -15,7 -17,7 -16,7 +s:300 15,7 17,7 -15,7 -17,7 16,7 +n:450 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7 +R:630 1,3 16,3 -1,3 -16,3 +M:1350 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7 1,3 16,3 -1,3 -16,3 15,7 17,7 -15,7 -17,7 +k:-1 1,7 16,7 15,7 17,7 -1,7 -16,7 -15,7 -17,7 + // Medieval intermediate between Shatranj and FIDE Chess Game: courier 12x8 diff --git a/fairymax.c b/fairymax.c index 94edc78..28d92d6 100644 --- a/fairymax.c +++ b/fairymax.c @@ -100,7 +100,7 @@ int Post; int Fifty; int GameNr; int Resign; -int Cambodian; +char Cambodian[80] = "makruk"; int Threshold = 800; int Score; int makruk; @@ -455,7 +455,7 @@ void PrintOptions() printf("feature option=\"Ini File -file %s\"\n", inifile); printf("feature option=\"Multi-PV Margin -spin %d 0 1000\"\n", margin); printf("feature option=\"Variant fairy selects -combo "); PrintVariants(1); printf("\"\n"); - printf("feature option=\"Cambodian Makruk rules -check %d\"\n", Cambodian); + printf("feature option=\"Makruk rules -combo makruk /// cambodian /// ai-wok\"\n"); printf("feature option=\"Dummy Slider Example -slider 20 0 100\"\n"); printf("feature option=\"Dummy String Example -string happy birthday!\"\n"); printf("feature option=\"Dummy Path Example -path .\"\n"); @@ -480,7 +480,7 @@ void LoadGame(char *name) gating = succession = 0; if(name != NULL) { /* search for game name in definition file */ - if(!strcmp(name, "makruk") && Cambodian) name = "cambodian"; else + if(!strcmp(name, "makruk")) name = Cambodian; else if(!strcmp(name, "fairy")) name = selectedFairy; gating = !strcmp(name, "seirawan"); while((ptc=fscanf(f, "Game: %s # %s", buf, pieceToChar))==0 || strcmp(name, buf) ) { @@ -746,7 +746,7 @@ int main(int argc, char **argv) if(sscanf(line+7, "Clear Hash%c", &c) == 1) for(i=0; i<=U; i++) A->K = 0; if(sscanf(line+7, "MultiVariation Margin=%d", &margin) == 1) continue; if(sscanf(line+7, "Variant fairy selects=%s", selectedFairy+6) == 1) continue; - if(sscanf(line+7, "Cambodian Makruk rules=%d", &Cambodian) == 1) continue; + if(sscanf(line+7, "Makruk rules=%s", Cambodian) == 1) continue; continue; } if (!strcmp(command, "go")) {