};\r
\r
PieceDesc ddPieces[] = {\r
- {"LG", "", 10, { 1,H,1,H,1,H,1,H } }, // Long-Nosed Goblin G!\r
- {"OK", "LG", 10, { 2,1,2,0,2,0,2,1 } }, // Old Kite K'\r
+ {"HM", "", 10, { H,0,H,0,H,0,H,0 } }, // Hook Mover H!\r
+ {"LO", "", 10, { 1,H,1,H,1,H,1,H } }, // Long-Nosed Goblin G!\r
+ {"OK", "LO", 10, { 2,1,2,0,2,0,2,1 } }, // Old Kite K'\r
{"PS", "HM", 10, { J,0,1,J,0,J,1,0 } }, // Poisonous Snake S'\r
+ {"FF", "", 10, { F,F,F,F,F,F,F,F } }, // Furious Fiend +L!\r
{"GE", "", 10, { 3,3,5,5,3,5,5,3 } }, // Great Elephant +W!\r
{"WS", "LD", 10, { 1,1,2,0,1,0,2,1 } }, // Western Barbarian W'\r
{"EA", "LN", 10, { 2,1,1,0,2,0,1,1 } }, // Eastern Barbarian E'\r
{"SB", "", 10, { X,X,2,2,2,2,2,X } }, // Standard Bearer +N\r
{"FH", "FK", 10, { 1,2,1,0,1,0,1,2 } }, // Flying Horse H'\r
{"NK", "SB", 10, { 1,1,1,1,1,1,1,1 } }, // Neighbor King N\r
+ {"RG", "", 10, { 1,1,0,1,1,1,1,1 } }, // Right General R'\r
+ {"LG", "", 10, { 1,1,1,1,1,1,0,1 } }, // Left General L'\r
{"BM", "MW", 10, { 0,1,1,1,0,1,1,1 } }, // Blind Monkey\r
{"DO", "", 10, { 2,5,2,5,2,5,2,5 } }, // Dove\r
{"EB", "DO", 10, { 2,0,2,0,0,0,2,0 } }, // Enchanted Badger B'\r
{"SD", "", 10, { 5,2,5,2,5,2,5,2 } }, // She-Devil\r
{"GD", "", 10, { 2,3,X,3,2,3,X,3 } }, // Great Dragon\r
{"GO", "", 10, { X,3,2,3,X,3,2,3 } }, // Golden Bird\r
+ {"LC", "", 10, { X,0,0,X,1,0,0,X } }, // Left Chariot L'\r
+ {"RC", "", 10, { X,X,0,0,1,X,0,0 } }, // Right Chariot R'\r
// Chu pieces (but with different promotion)\r
{"LN", "FF",LVAL, { L,L,L,L,L,L,L,L }, 4 }, // lion\r
{"FK", "", 600, { X,X,X,X,X,X,X,X }, 4 }, // free king\r
{"DV", "TK", 10, { 0,1,0,1,0,0,1,1 } }, // Deva I'\r
{"DS", "BS", 10, { 0,1,1,0,0,1,0,1 } }, // Dark Spirit J'\r
{"T", "fT", 10, { 0,1,0,0,1,0,0,1 } }, // Tile General Y\r
- {"CS", "fS", 10, { 1,0,0,1,1,1,0,0 } }, // Coiled Serpent S!\r
+ {"CO", "fS", 10, { 1,0,0,1,1,1,0,0 } }, // Coiled Serpent S!\r
{"RD", "fD", 10, { 1,0,1,1,1,1,1,0 } }, // Reclining Dragon D!\r
{"CC", "WS", 10, { 0,1,1,0,1,0,1,1 } }, // Chinese Cock N'\r
{"OM", "MW", 10, { 0,1,0,1,1,1,0,1 } }, // Old Monkey M'\r
{"GO", "", 10, { X,3,2,3,X,3,2,3 } }, // Golden Bird +X\r
{"fW", "", 10, { X,X,X,0,0,0,X,X } }, // Free Wolf +W\r
{"BA", "", 10, { X,0,0,X,0,X,0,0 } }, // Bat +O'\r
+ {"FD", "G", 150, { 0,2,0,2,0,2,0,2 }, 2 }, // Flying Dragon\r
+ // Dai pieces with different promotion\r
+ {"FD", "G", 150, { 0,2,0,2,0,2,0,2 }, 2 }, // Flying Dragon\r
+ {"VO", "G", 200, { 2,0,2,0,2,0,2,0 }, 2 }, // Violent Ox\r
+ {"EW", "fW", 80, { 1,1,1,0,0,0,1,1 }, 2 }, // Evil Wolf\r
+ {"CS", "B", 70, { 0,1,0,1,0,1,0,1 }, 1 }, // Cat Sword\r
+ {"AB", "FB", 60, { 1,0,1,0,1,0,1,0 }, 1 }, // Angry Boar\r
+ {"T", "fY", 80, { 0,1,0,0,1,0,0,1 }, 2 }, // Tile\r
+ {"I", "fI", 80, { 1,1,0,0,0,0,0,1 }, 2 }, // Iron\r
+ {"N", "G", 60, { N,0,0,0,0,0,0,N }, 0 }, // Knight\r
+ {"SG", "fU", 50, { 0,1,0,0,0,0,0,1 }, 0 }, // Stone\r
// Chu pieces (but with different promotion)\r
{"LN", "FF",LVAL, { L,L,L,L,L,L,L,L }, 4 }, // lion\r
{"FK", "", 600, { X,X,X,X,X,X,X,X }, 4 }, // free king\r
"16/16/16/16/"\r
"4D6D4/PPPPPPPPPPPPPPPP/MVRF!E!B!R!Q!V!R!B!E!F!RVM/"\r
"S'V'BHDW!D!H!Q'D!W!DHBV'S'/A1C!C!TOL!QXT1C!C!1A/LNFICSGKEGSCIFNL";\r
+char cashewArray[]= "lh!f'dh'j'ki'qc'hg!l/t!p'w!+oogngx+xl!k'd!/r've'fst'+nt'sfw'vl'/ppppppppppppp/3d'5d'3/13/"\r
+ "13/13/3D'5D'3/PPPPPPPPPPPPP/L'VW'FST'+NT'SFE'VR'/D!K'L!+XXGNGO+OW!P'T!/LG!HC'QI'KJ'H'DF'H!L";\r
+char macadArray[] = "lxcsgi'kj'gscol/1f'1w!1tet1l!1f'1/rr'g'bdh!qc!dbw'l'r/ppppppppppppp/3p'5p'3/13/"\r
+ "13/13/3P'5P'3/PPPPPPPPPPPPP/RL'W'BDC!QH!DBG'R'R/1F'1L!1TET1W!1F'1/LOCSGI'KJ'GSCXL";\r
char shoArray[] = "lnsgkgsnl/1r2e2b1/ppppppppp/9/9/9/PPPPPPPPP/1B2E2R1/LNSGKGSNL";\r
char waArray[] = "hmlcvkwgudo/1e3s3f1/ppprpppxppp/3p3p3/11/11/11/3P3P3/PPPXPPPRPPP/1F3S3E1/ODUGWKVCLMH";\r
char chessArray[] = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR";\r
char *IDs;\r
} VariantDesc;\r
\r
-typedef enum { V_CHESS, V_SHO, V_CHU, V_DAI, V_DADA, V_MAKA, V_TAI, V_KYOKU, V_TENJIKU, V_SHATRANJ, V_MAKRUK, V_LION, V_WA, V_WOLF } Variant;\r
+typedef enum { V_CHESS, V_SHO, V_CHU, V_DAI, V_DADA, V_MAKA, V_TAI, V_KYOKU, V_TENJIKU,\r
+ V_CASHEW, V_MACAD, V_SHATRANJ, V_MAKRUK, V_LION, V_WA, V_WOLF } Variant;\r
\r
#define SAME (-1)\r
\r
{ 16, 8, 8, 3, V_MAKRUK, "makruk", thaiArray, chessIDs}, // Makruk\r
{ 16, 8, 8, 1, V_LION, "lion", lionArray, chessIDs}, // Mighty Lion\r
{ 22, 11, 11, 3, V_WA, "wa-shogi", waArray, waIDs}, // Wa\r
- { 16, 8, 8, 1, V_WOLF, "werewolf",wolfArray, chessIDs}, // Wa\r
+ { 16, 8, 8, 1, V_WOLF, "werewolf",wolfArray, chessIDs}, // Werewolf Chess\r
+ { 26, 13, 13,13, V_CASHEW, "cashew-shogi", cashewArray, dadaIDs }, // Cashew\r
+ { 26, 13, 13,13, V_MACAD, "macadamia-shogi", macadArray, makaIDs }, // Macadamia\r
\r
{ 0, 0, 0, 0, 0 }, // sentinel\r
{ 34, 17, 17, 0, V_DADA, "dada", chuArray }, // Dai Dai\r
return ListLookUp(name, waPieces);\r
case V_WOLF: // Werewolf\r
return ListLookUp(name, wolfPieces);\r
+ case V_CASHEW: // Cashew\r
+ return ListLookUp(name, ddPieces);\r
+ case V_MACAD: // Cashew\r
+ return ListLookUp(name, makaPieces);\r
}\r
return NULL;\r
}\r
void\r
SetUp (char *array, int var)\r
{\r
- int i, j, n, m, color;\r
- char c, name[3], prince = 0;\r
+ int i, j, n, m, color, c;\r
+ char name[3], prince = 0;\r
PieceDesc *p1, *p2;\r
last[WHITE] = 1; last[BLACK] = 0;\r
royal[WHITE] = royal[BLACK] = 0;\r
name[1] = IDs[2*(c - 'A') + 1]; if(name[1] == ' ') name[1] = 0;\r
if(!strcmp(name, "CP") || pflag && !strcmp(name, "DE")) prince |= color+1; // remember if we added Crown Prince\r
p1 = LookUp(name, var);\r
- if(!p1) printf("tellusererror Unknown piece '%s' in setup\n", name), exit(-1);\r
+ if(!p1) printf("tellusererror Unknown piece '%s' in setup (%d)\n", name, c), exit(-1);\r
if(pflag && p1->promoted) p1 = LookUp(p1->promoted, var); // use promoted piece instead\r
n = AddPiece(color, p1);\r
p[n].pos = j;\r
"piece +P& WfF\npiece +O& K\npiece +H& vN\npiece +U& BfW\npiece +L& vRfF3bFsW\npiece +M& FfW\npiece +G& sRvW\npiece +C& vRsWfF\n"\r
"piece D& sbWfF\npiece V& FfW\npiece W& WfF\npiece S& sRvW\npiece R& FfRbW\npiece F& BfW\npiece X& FvWAvD\n"\r
"piece +D& WfF\npiece +V& FfsW\npiece +W& K\npiece +S& R\npiece +R& FvWAvD\npiece +F& BvRsW\npiece E& vRfF3bFsW\n");\r
+ if(currentVariant == V_MACAD)\r
+ printf("setup (P.*B*RQSEXOG....D^J'..*LP'.L!J'...*W!...*F'...^C.C.^L!.^P'^K.T*L'.*C!*H!^I'.^E...*R'^P^T*W'*G'^G^SI'^X^OK"\r
+ "p.*b*rqsexog....d^j'..*lp'.l!j'...*w!...*f'...^c.c.^l!.^p'^k.t*l'.*c!*h!^i'.^e...*r'^p^t*w'*g'^g^si'^x^ok) 13x13+0_chu "\r
+ "%s w 0 1\n", macadArray);\r
+ if(currentVariant == V_CASHEW)\r
+ printf("setup (P.^K'^S'QS.XOGND'.HDT!...P'.L!E'.^EK'W!..LF'V^W'J'H'...^L!^N..FT'L'C'G!H!D!I'.^H'..R'..^C'^F'..W'^X^OK"\r
+ "p.^k'^s'qs.xognd'.hdt!...p'.l!e'.^ek'w!..lf'v^w'j'h'...^l!^n..ft'l'c'g!h!d!i'.^h'..r'..^c'^f'..w'^x^ok) 13x13+0_chu "\r
+ "%s w 0 1\n", cashewArray);\r
repStack[199] = hashKeyH, checkStack[199] = 0;\r
continue;\r
}\r