case VariantShatranj:
case VariantCourier:
case VariantMakruk:
+ case VariantASEAN:
case VariantGrand:
flags &= ~F_ALL_CASTLE_OK;
break;
BlackKing, BlackMan, BlackKnight, BlackRook }
};
+ChessSquare aseanArray[2][BOARD_FILES] = { /* [HGM] (movGen knows about Shatranj Q and P) */
+ { WhiteRook, WhiteKnight, WhiteMan, WhiteFerz,
+ WhiteKing, WhiteMan, WhiteKnight, WhiteRook },
+ { BlackRook, BlackKnight, BlackMan, BlackFerz,
+ BlackKing, BlackMan, BlackKnight, BlackRook }
+};
+
#if (BOARD_FILES>=10)
ChessSquare ShogiArray[2][BOARD_FILES] = {
case Variant3Check: /* should work except for win condition */
case VariantShatranj: /* should work except for all win conditions */
case VariantMakruk: /* should work except for draw countdown */
+ case VariantASEAN : /* should work except for draw countdown */
case VariantBerolina: /* might work if TestLegality is off */
case VariantCapaRandom: /* should work */
case VariantJanus: /* should work */
break;
case WhitePromotion:
case BlackPromotion:
- if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
+ if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier ||
+ gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN)
snprintf(user_move, MSG_SIZ, "%c%c%c%c=%c\n",
AAA + fromX, ONE + fromY, AAA + toX, ONE + toY,
PieceToChar(WhiteFerz));
startedFromSetupPosition = TRUE;
SetCharTable(pieceToChar, "PN.R.M....SKpn.r.m....sk");
break;
+ case VariantASEAN:
+ pieces = aseanArray;
+ nrCastlingRights = 0;
+ startedFromSetupPosition = TRUE;
+ SetCharTable(pieceToChar, "PN.R.Q....BKpn.r.q....bk");
+ break;
case VariantTwoKings:
pieces = twoKingsArray;
break;
pawnRow = gameInfo.boardHeight - 7; /* seems to work in all common variants */
if(pawnRow < 1) pawnRow = 1;
- if(gameInfo.variant == VariantMakruk || gameInfo.variant == VariantGrand) pawnRow = 2;
+ if(gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN || gameInfo.variant == VariantGrand) pawnRow = 2;
/* User pieceToChar list overrules defaults */
if(appData.pieceToCharTable != NULL)
DefaultPromoChoice (int white)
{
ChessSquare result;
- if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
+ if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier ||
+ gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN)
result = WhiteFerz; // no choice
else if(gameInfo.variant == VariantSuicide || gameInfo.variant == VariantGiveaway)
result= WhiteKing; // in Suicide Q is the last thing we want
}
// we either have a choice what to promote to, or (in Shogi) whether to promote
- if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk) {
+ if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier ||
+ gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN) {
*promoChoice = PieceToChar(BlackFerz); // no choice
return FALSE;
}
if(gameInfo.variant == VariantShogi || gameInfo.variant == VariantXiangqi ||
gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat ||
gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier ||
- gameInfo.variant == VariantMakruk) return FALSE;
+ gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN) return FALSE;
return (piece == BlackPawn && y == 1 ||
piece == WhitePawn && y == BOARD_HEIGHT-2 ||
piece == BlackLance && y == 1 ||
if(gameInfo.variant == VariantShatranj ||
gameInfo.variant == VariantXiangqi ||
gameInfo.variant == VariantCourier ||
+ gameInfo.variant == VariantASEAN ||
gameInfo.variant == VariantMakruk )
selection = (ChessSquare)((int)selection - (int)WhiteQueen + (int)WhiteFerz);
goto defaultlabel;
}
if(gameInfo.variant != VariantShogi && gameInfo.variant != VariantXiangqi &&
- gameInfo.variant != VariantShatranj && gameInfo.variant != VariantCourier && gameInfo.variant != VariantMakruk ) {
+ gameInfo.variant != VariantShatranj && gameInfo.variant != VariantCourier &&
+ gameInfo.variant != VariantMakruk && gameInfo.variant != VariantASEAN ) {
/* En passant target square */
if (move > backwardMostMove) {
fromX = moveList[move - 1][0] - AAA;
/* read e.p. field in games that know e.p. capture */
if(gameInfo.variant != VariantShogi && gameInfo.variant != VariantXiangqi &&
- gameInfo.variant != VariantShatranj && gameInfo.variant != VariantCourier && gameInfo.variant != VariantMakruk ) {
+ gameInfo.variant != VariantShatranj && gameInfo.variant != VariantCourier &&
+ gameInfo.variant != VariantMakruk && gameInfo.variant != VariantASEAN ) {
if(*p=='-') {
p++; board[EP_STATUS] = EP_NONE;
} else {
VariantGreat,
VariantTwilight,
VariantMakruk,
+ VariantASEAN,
VariantSChess,
VariantGrand,
VariantSpartan,
"great",\
"twilight",\
"makruk",\
+ "asean",\
"seirawan",\
"grand",\
"spartan",\
{ 0, 0, 275, NULL, NULL, NULL, NULL, Label, warning },
{ 0, 0, 275, NULL, NULL, NULL, NULL, Label, "Variants marked with * can only be played\nwith legality testing off"},
{ 0, SAME_ROW, 0, NULL, NULL, NULL, NULL, Break, ""},
-{ VariantFairy, 0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("fairy")},
+{ VariantASEAN, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_("ASEAN")},
{ VariantGreat, SAME_ROW, 135, NULL, (void*) &Pick, "#BFBFFF", NULL, Button, N_("Great Shatranj (10x8)")},
{ VariantSChess, 0, 135, NULL, (void*) &Pick, "#FFBFBF", NULL, Button, N_("Seirawan")},
{ VariantFalcon, SAME_ROW, 135, NULL, (void*) &Pick, "#BFBFFF", NULL, Button, N_("falcon (10x8)")},
{ VariantShogi, SAME_ROW, 135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("shogi (9x9)")},
{ VariantSpartan, 0, 135, NULL, (void*) &Pick, "#FF0000", NULL, Button, N_("Spartan")},
{ VariantXiangqi, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("xiangqi (9x10)")},
-{ VariantNormal, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment
+{ VariantFairy, 0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("fairy")},
+//{ VariantNormal, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment
{ VariantCourier, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFBF", NULL, Button, N_("courier (12x8)")},
{ 0, NO_OK, 0, NULL, NULL, "", NULL, EndMark , "" }
};
/* Shogi Pawn and Silver General: first the Pawn move, */
/* then the General continues like a Ferz */
case WhiteMan:
- if(gameInfo.variant != VariantMakruk) goto commoner;
+ if(gameInfo.variant != VariantMakruk && gameInfo.variant != VariantASEAN) goto commoner;
case SHOGI WhitePawn:
case SHOGI WhiteFerz:
if (rf < BOARD_HEIGHT-1 &&
break;
case BlackMan:
- if(gameInfo.variant != VariantMakruk) goto commoner;
+ if(gameInfo.variant != VariantMakruk && gameInfo.variant != VariantASEAN) goto commoner;
case SHOGI BlackPawn:
case SHOGI BlackFerz:
if (rf > 0 &&
} else
if (closure->kind == WhitePromotion || closure->kind == BlackPromotion) {
if(c == NULLCHAR) { // missing promoChar on mandatory promotion; use default for variant
- if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
+ if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier ||
+ gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN)
c = PieceToChar(BlackFerz);
else if(gameInfo.variant == VariantGreat)
c = PieceToChar(BlackMan);
#define OPT_VariantMakruk 1529\r
#define OPT_VariantSChess 1530\r
#define OPT_VariantSpartan 1531\r
+#define OPT_VariantASEAN 1532\r
#define OPT_VariantGrand 1534\r
#define IDC_Files 1550\r
#define IDC_Ranks 1551\r
94,70,10\r
CONTROL "&makruk",OPT_VariantMakruk,"Button",BS_AUTORADIOBUTTON,80,\r
104,70,10\r
+ CONTROL "&ASEAN",OPT_VariantASEAN,"Button",BS_AUTORADIOBUTTON,80,\r
+ 114,70,10\r
CONTROL "&gothic",OPT_VariantGothic,"Button",BS_AUTORADIOBUTTON,154,14,\r
70,10\r
CONTROL "&capablanca",OPT_VariantCapablanca,"Button",BS_AUTORADIOBUTTON,154,\r
OPT_VariantGreat,\r
-1, // Twilight,\r
OPT_VariantMakruk,\r
+ OPT_VariantASEAN,\r
OPT_VariantSChess,\r
OPT_VariantGrand,\r
OPT_VariantSpartan, // Spartan\r
knightmate King moves as Knight, and vice versa
super Superchess (shuffle variant with 4 exo-pieces)
makruk Thai Chess (shatranj-like, P promotes on 6th rank)
+asean ASEAN Chess (a modernized version of Makruk)
spartan Spartan Chess (black has unorthodox pieces)
fairy A catchall variant in which all piece types
known to XBoard can participate (8x8)