From 310eb07a6b4d868a6ad0e4c59aec46af572c4ec0 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sat, 6 Oct 2018 18:43:11 +0200 Subject: [PATCH] Support Jeson Mor https://en.wikipedia.org/wiki/Jeson_Mor Positions are considered to be winning if a player has the move and one of his knights is on e5. No functional change for other variants. --- src/variant.cpp | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/variant.cpp b/src/variant.cpp index 227868f..e56f626 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -500,6 +500,23 @@ void VariantMap::init() { v->promotionPieceTypes = {ARCHBISHOP, CHANCELLOR, QUEEN, ROOK, BISHOP, KNIGHT}; return v; } (); + const Variant* jesonmor = [&]{ + Variant* v = new Variant(); + v->maxRank = RANK_9; + v->maxFile = FILE_I; + v->reset_pieces(); + v->add_piece(KNIGHT, 'n'); + v->startFen = "nnnnnnnnn/9/9/9/9/9/9/9/NNNNNNNNN w - - 0 1"; + v->promotionPieceTypes = {}; + v->doubleStep = false; + v->castling = false; + v->stalemateValue = -VALUE_MATE; + v->flagPiece = KNIGHT; + v->whiteFlag = make_bitboard(SQ_E5); + v->blackFlag = make_bitboard(SQ_E5); + v->flagMove = true; + return v; + } (); #endif // Add to UCI_Variant option @@ -542,6 +559,7 @@ void VariantMap::init() { add("capablanca", capablanca); add("janus", janus); add("embassy", embassy); + add("jesonmor", jesonmor); #endif } -- 1.7.0.4