From 0551b9211f9fa2105581a7620399c034125296f9 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sun, 18 Oct 2020 00:23:21 +0200 Subject: [PATCH] Support Chaturanga https://en.wikipedia.org/wiki/Chaturanga The exact historic rules of this game are unknown. This implementations follows the rules from chess.com. --- src/variant.cpp | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/variant.cpp b/src/variant.cpp index 19b9826..55f671b 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -129,6 +129,7 @@ namespace { Variant* shatranj_variant() { Variant* v = fairy_variant_base(); v->variantTemplate = "shatranj"; + v->pieceToCharTable = "PN.R.QB....Kpn.r.qb....k"; v->remove_piece(BISHOP); v->remove_piece(QUEEN); v->add_piece(ALFIL, 'b'); @@ -146,6 +147,15 @@ namespace { v->nMoveRule = 70; return v; } + // Chaturanga + // https://en.wikipedia.org/wiki/Chaturanga + // Rules as used on chess.com + Variant* chaturanga_variant() { + Variant* v = shatranj_variant(); + v->startFen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 0 1"; + v->extinctionValue = VALUE_NONE; + return v; + } Variant* amazon_variant() { Variant* v = chess_variant(); v->pieceToCharTable = "PNBR..............AKpnbr..............ak"; @@ -964,6 +974,7 @@ void VariantMap::init() { add("asean", asean_variant()); add("ai-wok", aiwok_variant()); add("shatranj", shatranj_variant()); + add("chaturanga", chaturanga_variant()); add("amazon", amazon_variant()); add("hoppelpoppel", hoppelpoppel_variant()); add("newzealand", newzealand_variant()); -- 1.7.0.4