toriProms[16] = { Z_MUST, 0, 0, 0, 0, Z_MUST },
waProms[16] = { Z_MUST, Z_2ND, Z_MUST, Z_MUST, Z_MUST, COLOR, COLOR, Z_MUST, Z_MUST, Z_MUST, COLOR, Z_MUST, COLOR, Z_MUST };
-int lances[] = { 1, 3, 0103, 0103, 1, 1, 3, 3, 1 }; // bitmap indicating piece types with drop restriction (LSB = Pawn) in various variants
+int lances[] = { 1, 3, 0103, 0103, 1, 3, 3, 1 }; // bitmap indicating piece types with drop restriction (LSB = Pawn) in various variants
char *betza[] = { // piece defs for sending to GUI
NULL, // suppresses setup command
"",
NULL,
",N& fNsW,+P& WfF,+N WfF",
- NULL,
",P& fW,L& fWbF,U& fWbF,C& fFsW,G& fFvW,M& fFvW,D& fFbsW,V& FfW,W& WfF,O& fR,H& fRbW2,S& sRvW,F& BfW,E& vRfF3bFsW,R& fRFbW,X& FAvWvD"
",+P& WfF,+L& vRfF3bFsW,+U& BfW,+C& vRfFsW,+G& sRvW,+M& FfW,+D& WfF,+V& FfsW,+W& K,+O& K,+H& vN,+S& R,+F& BvRsW,+R& FAvWvD",
NULL,
"PNBR.S...G.++++.+Kpnbr.s...g.++++.+k",
NULL,
"PNBR.....G.++++Kpnbr.....g.++++k",
- NULL,
"P..^S^FV..^LW^OH.F.^R.E....R...D.GOL^M..^H.M.C.^CU.^W../.......^V.^P.^U..^DS.^GXK"
"p..^s^fv..^lw^oh.f.^r.e....r...d.gol^m..^h.m.c.^cu.^w../.......^v.^p.^u..^ds.^gxk",
NULL,
"3077160 7777187",
"3077160 7777187",
"30771607 77771877",
- "30771607 77771877",
"3055676777060100 77100787777801",
"3055676777060100 77100787777801",
"770076 100001"
{ 6, 6, 6, 2, "judkinshogi\n", shogiIDs, judkinFEN, shogiDirs, shogiProms, shogiCodes, judkinValues },
{ 9, 9, 7, 3, "shogi\n", shogiIDs, shogiFEN, shogiDirs, shogiProms, shogiCodes, shogiValues },
{ 8, 8, 5, 3, "euroshogi\n", euroIDs, euroFEN, shogiDirs, shogiProms, shogiCodes, shogiValues },
- { 8, 8, 5, 3, "8x8+5_shogi\n", euroIDs, euroFEN, shogiDirs, shogiProms, shogiCodes, shogiValues },
{ 11, 11, 16, 3, "crazywa\n", waIDs, waFEN, waDirs, waProms, shogiCodes, waValues },
{ 11, 11, 16, 3, "11x17+16_chu\n",waIDs, waFEN, waDirs, waProms, shogiCodes, waValues },
{ 7, 7, 6, 2, "torishogi\n", toriIDs, toriFEN, toriDirs, toriProms, toriCodes, toriValues },
};
-#define TORI_NR 8 /* must correspond to index of torishogi (which must be last) in table above! */
+#define TORI_NR 7 /* must correspond to index of torishogi (which must be last) in table above! */
#define KNIGHTLESS 4 /* first variant without a Knight (except mini-, which has no 2-rank zone) */
// info per piece type. sometimes indexed by negated holdings count instead of piece
void
GameInit (char *name)
{
- int v, *ip, i, color, r, f, zone;
+ int v=0, *ip, i, color, r, f, zone;
unsigned char *moves, *codes; char c, *p;
// determine variant parameters
if(sscanf(name, "%dx%d+%d_%c", &f, &r, &i, &c) == 4) {
for(v=TORI_NR+1; --v>0; ) if(variants[v].files == f && variants[v].ranks == r && variants[v].hand == i) break;
- } else
- for(v=TORI_NR+1; --v>0;) if(!strcmp(name, variants[v].name)) break;
+ }
+ if(v <= 0) for(v=TORI_NR+1; --v>0;) if(!strcmp(name, variants[v].name)) break;
nrFiles = variants[v].files;
nrRanks = variants[v].ranks;
zone = variants[v].zone;