From 10a0f58ffe1c399d4f814d66e5458afd97ed7150 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Tue, 31 Dec 2019 13:29:56 +0100 Subject: [PATCH] Support nocastle chess --- src/ucioption.cpp | 2 +- src/variant.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index a01d6d2..9d464a6 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -45,7 +45,7 @@ namespace UCI { // standard variants of XBoard/WinBoard std::set standard_variants = { - "normal", "fischerandom", "3check", "makruk", "shatranj", + "normal", "nocastle", "fischerandom", "3check", "makruk", "shatranj", "asean", "seirawan", "crazyhouse", "bughouse", "suicide", "giveaway", "losers", "capablanca", "gothic", "janus", "caparandom", "grand", "shogi", "xiangqi" }; diff --git a/src/variant.cpp b/src/variant.cpp index 1d9ce18..7615515 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -47,6 +47,12 @@ namespace { v->chess960 = true; return v; } + Variant* nocastle_variant() { + Variant* v = chess_variant(); + v->startFen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 0 1"; + v->castling = false; + return v; + } Variant* fairy_variant() { Variant* v = chess_variant(); v->add_piece(SILVER, 's'); @@ -791,6 +797,7 @@ void VariantMap::init() { add("chess", chess_variant()); add("normal", chess_variant()); add("fischerandom", chess960_variant()); + add("nocastle", nocastle_variant()); add("fairy", fairy_variant()); // fairy variant used for endgame code initialization add("makruk", makruk_variant()); add("cambodian", cambodian_variant()); -- 1.7.0.4