From d4622058e47f7eb90a41b998717f0723c87a4c6e Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sat, 6 Oct 2018 17:48:45 +0200 Subject: [PATCH] Support Janus and Embassy chess No functional change for other variants. --- src/variant.cpp | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/src/variant.cpp b/src/variant.cpp index 0d2325b..227868f 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -477,6 +477,29 @@ void VariantMap::init() { v->promotionPieceTypes = {ARCHBISHOP, CHANCELLOR, QUEEN, ROOK, BISHOP, KNIGHT}; return v; } (); + const Variant* janus = [&]{ + Variant* v = new Variant(); + v->maxRank = RANK_8; + v->maxFile = FILE_J; + v->castlingKingsideFile = FILE_I; + v->castlingQueensideFile = FILE_B; + v->add_piece(ARCHBISHOP, 'j'); + v->startFen = "rjnbkqbnjr/pppppppppp/10/10/10/10/PPPPPPPPPP/RJNBKQBNJR w KQkq - 0 1"; + v->promotionPieceTypes = {ARCHBISHOP, QUEEN, ROOK, BISHOP, KNIGHT}; + return v; + } (); + const Variant* embassy = [&]{ + Variant* v = new Variant(); + v->maxRank = RANK_8; + v->maxFile = FILE_J; + v->castlingKingsideFile = FILE_H; + v->castlingQueensideFile = FILE_B; + v->add_piece(ARCHBISHOP, 'a'); + v->add_piece(CHANCELLOR, 'c'); + v->startFen = "rnbqkcabnr/pppppppppp/10/10/10/10/PPPPPPPPPP/RNBQKCABNR w KQkq - 0 1"; + v->promotionPieceTypes = {ARCHBISHOP, CHANCELLOR, QUEEN, ROOK, BISHOP, KNIGHT}; + return v; + } (); #endif // Add to UCI_Variant option @@ -517,6 +540,8 @@ void VariantMap::init() { #ifdef LARGEBOARDS add("shogi", shogi); add("capablanca", capablanca); + add("janus", janus); + add("embassy", embassy); #endif } -- 1.7.0.4