X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.h;h=d3160109d6e540e7f527976ff3cbb76613e39b46;hp=0788bda28a322ed6de71d91e91268ec5c8b78f15;hb=4b86ef8c4f8755850b38f2eca026cb9da20c4d01;hpb=e9aeaad05266ca557a9496b5a17b4c5f82f0e946 diff --git a/src/uci.h b/src/uci.h index 0788bda2..d3160109 100644 --- a/src/uci.h +++ b/src/uci.h @@ -1,8 +1,6 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 - Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file) Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,6 +24,8 @@ #include "types.h" +namespace Stockfish { + class Position; namespace UCI { @@ -49,14 +49,14 @@ public: Option(OnChange = nullptr); Option(bool v, OnChange = nullptr); Option(const char* v, OnChange = nullptr); - Option(int v, int minv, int maxv, OnChange = nullptr); - Option(const char* v, const char *cur, OnChange = nullptr); + Option(double v, int minv, int maxv, OnChange = nullptr); + Option(const char* v, const char* cur, OnChange = nullptr); Option& operator=(const std::string&); void operator<<(const Option&); - operator int() const; + operator double() const; operator std::string() const; - bool operator==(const char*); + bool operator==(const char*) const; private: friend std::ostream& operator<<(std::ostream&, const OptionsMap&); @@ -73,10 +73,13 @@ std::string value(Value v); std::string square(Square s); std::string move(Move m, bool chess960); std::string pv(const Position& pos, Depth depth, Value alpha, Value beta); +std::string wdl(Value v, int ply); Move to_move(const Position& pos, std::string& str); } // namespace UCI extern UCI::OptionsMap Options; +} // namespace Stockfish + #endif // #ifndef UCI_H_INCLUDED