Support Janus and Embassy chess
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 6 Oct 2018 15:48:45 +0000 (17:48 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 7 Oct 2018 14:40:23 +0000 (16:40 +0200)
No functional change for other variants.

src/variant.cpp

index 0d2325b..227868f 100644 (file)
@@ -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
 }