From: Fabian Fichter Date: Sun, 9 Sep 2018 13:32:21 +0000 (+0200) Subject: Support extended setup command of UCI2WB X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6ac24517229a02328cdde094fddef929db2d93f4;p=fairystockfish.git Support extended setup command of UCI2WB --- diff --git a/src/ucioption.cpp b/src/ucioption.cpp index cc1bf62..2df5730 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -43,7 +43,14 @@ void on_logger(const Option& o) { start_logger(o); } void on_threads(const Option& o) { Threads.set(o); } void on_tb_path(const Option& o) { Tablebases::init(o); } void on_variant_change(const Option &o) { - sync_cout << "info string variant " << (std::string)o << " startpos " << variants.find(o)->second->startFen << sync_endl; + const Variant * v = variants.find(o)->second; + sync_cout << "info string variant " << (std::string)o + << " files " << v->maxFile + 1 + << " ranks " << v->maxRank + 1 + << " pocket " << (v->pieceDrops ? v->pieceTypes.size() : 0) + << " template " << v->variantTemplate + << " startpos " << v->startFen + << sync_endl; } diff --git a/src/variant.cpp b/src/variant.cpp index a973f8d..d5f9ed1 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -240,6 +240,7 @@ VariantMap variants; // Global object } Variant* minishogi_variant() { Variant* v = fairy_variant_base(); + v->variantTemplate = "shogi"; v->maxRank = RANK_5; v->maxFile = FILE_E; v->reset_pieces(); diff --git a/src/variant.h b/src/variant.h index 2aed7d9..dd29916 100644 --- a/src/variant.h +++ b/src/variant.h @@ -32,6 +32,7 @@ /// Variant struct stores information needed to determine the rules of a variant. struct Variant { + std::string variantTemplate = "fairy"; Rank maxRank = RANK_8; File maxFile = FILE_H; std::set pieceTypes = { PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING };