Reorder variants, to comply with Polyglot book specs
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 10 Sep 2014 18:49:38 +0000 (20:49 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 10 Sep 2014 18:49:38 +0000 (20:49 +0200)
XBoard's variant number is used as a key to access Polyglot opening
books, and thus cannot be changed without consequences. (As it was when
we introduced ASEAN and Chu Shogi.)
  We also renamed Chu Chess to Elven Chess (under which name it is now
described on chessvariants.org).

common.h
dialogs.c
winboard/woptions.c

index f2cb9e9..e6c3b20 100644 (file)
--- a/common.h
+++ b/common.h
@@ -376,7 +376,6 @@ typedef enum {
     Variant36,           /* Temporary name for possible future ICC wild 36 */
     VariantShogi,        /* [HGM] added variants */
     VariantChu,
-    VariantXiangqi,
     VariantCourier,
     VariantGothic,
     VariantCapablanca,
@@ -391,10 +390,11 @@ typedef enum {
     VariantGreat,
     VariantTwilight,
     VariantMakruk,
-    VariantASEAN,
     VariantSChess,
     VariantGrand,
     VariantSpartan,
+    VariantXiangqi,
+    VariantASEAN,
     VariantLion,
     VariantChuChess,
     VariantUnknown       /* Catchall for other unknown variants */
@@ -426,7 +426,6 @@ typedef enum {
   "wild36", \
   "shogi", \
   "chu", \
-  "xiangqi", \
   "courier", \
   "gothic", \
   "capablanca", \
@@ -441,12 +440,13 @@ typedef enum {
   "great",\
   "twilight",\
   "makruk",\
-  "asean",\
   "seirawan",\
   "grand",\
   "spartan",\
+  "xiangqi", \
+  "asean",\
   "lion",\
-  "chuchess",\
+  "elven",\
   "unknown" \
 }
 
index 8da6557..77e8911 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -490,7 +490,7 @@ static Option variantDescriptors[] = {
 { VariantXiangqi, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("xiangqi (9x10)")},
 { VariantLion,          0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("mighty lion")},
 { VariantCourier, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFBF", NULL, Button, N_("courier (12x8)")},
-{ VariantChuChess,      0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("chu chess (10x10)")},
+{ VariantChuChess,      0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("elven chess (10x10)")},
 { VariantChu,    SAME_ROW, 135, NULL, (void*) &Pick, "#BFFFBF", NULL, Button, N_("chu shogi (12x12)")},
 //{ -1,                   0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment
 // optional buttons for engine-defined variants
index 77e6eea..9c1942b 100644 (file)
@@ -850,7 +850,6 @@ int radioButton[] = {
     -1,\r
     OPT_VariantShogi,\r
     -1, // Chu\r
-    OPT_VariantXiangqi,\r
     OPT_VariantCourier,\r
     OPT_VariantGothic,\r
     OPT_VariantCapablanca,\r
@@ -865,10 +864,11 @@ int radioButton[] = {
     OPT_VariantGreat,\r
     -1, // Twilight,\r
     OPT_VariantMakruk,\r
-    OPT_VariantASEAN,\r
     OPT_VariantSChess,\r
     OPT_VariantGrand,\r
     OPT_VariantSpartan, // Spartan\r
+    OPT_VariantXiangqi,\r
+    OPT_VariantASEAN,\r
     OPT_VariantLion,\r
     -2 // sentinel\r
 };\r