Support extended setup command of UCI2WB
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 9 Sep 2018 13:32:21 +0000 (15:32 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 9 Nov 2018 23:05:30 +0000 (00:05 +0100)
src/ucioption.cpp
src/variant.cpp
src/variant.h

index cc1bf62..2df5730 100644 (file)
@@ -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;
 }
 
 
index a973f8d..d5f9ed1 100644 (file)
@@ -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();
index 2aed7d9..dd29916 100644 (file)
@@ -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<PieceType> pieceTypes = { PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING };