}
template <> void set(const std::string& value, Bitboard& target) {
- char token, token2;
+ char file;
+ int rank;
std::stringstream ss(value);
target = 0;
- while (ss >> token && ss >> token2)
- target |= make_square(File(tolower(token) - 'a'), Rank(token2 - '1'));
+ while (ss >> file && ss >> rank)
+ target |= file == '*' ? rank_bb(Rank(rank - 1)) : square_bb(make_square(File(tolower(file) - 'a'), Rank(rank - 1)));
}
} // namespace
}
Variant* pocketknight_variant() {
Variant* v = fairy_variant_base();
+ v->pocketSize = 2;
v->startFen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[Nn] w KQkq - 0 1";
v->pieceDrops = true;
v->capturesToHand = false;
}
Variant* xiangqi_variant() {
Variant* v = minixiangqi_variant();
+ v->pieceToCharTable = "PN.R.AB..K.C..........pn.r.ab..k.c..........";
v->maxRank = RANK_10;
v->maxFile = FILE_I;
v->add_piece(ELEPHANT, 'b', 'e');
# [File]: denotes a file of the board [1-12, a-i]
# [int]: any natural number [0, 1, ...]
# [PieceType]: a piece type [letters defined for pieces, e.g., p]
-# [Bitboard]: list of squares [e.g., d4 e4 d5 e5]
+# [Bitboard]: list of squares [e.g., d4 e4 d5 e5]. * can be used as wildcard for files (e.g., *1 is the first rank)
# [Value]: game result for the side to move [win, loss, draw]
# [CountingRule]: makruk or ASEAN counting rules [makruk, asean, none]
pieceDrops = true
capturesToHand = true
+# Hybrid variant of xiangqi and crazyhouse
+[xiangqihouse:xiangqi]
+pieceDrops = true
+capturesToHand = true
+whiteDropRegion = *1 *2 *3 *4 *5
+blackDropRegion = *6 *7 *8 *9 *10
+
# Hybrid variant of antichess and losalamos
[anti-losalamos]
pawn = p
# Indian great chess
# https://www.chessvariants.com/historic.dir/indiangr1.html
[indiangreat]
+pieceToCharTable = PNBRQ..VW.........G..Kpnbrq..vw.........g..k
pawn = p
knight = n
bishop = b