|
|
@ -3,6 +3,42 @@ |
|
|
|
//! and EngineOption tries to be flexible so it can be reused for each option, which also maintaining some
|
|
|
|
//! and EngineOption tries to be flexible so it can be reused for each option, which also maintaining some
|
|
|
|
//! of the nicer parts of typechecking.
|
|
|
|
//! of the nicer parts of typechecking.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the hash option
|
|
|
|
|
|
|
|
pub const HASH: &'static str = "Hash"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the Nalimov Path option
|
|
|
|
|
|
|
|
pub const NALIMOVPATH: &'static str = "NalimovPath"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the Nalimov Cache option
|
|
|
|
|
|
|
|
pub const NALIMOVCACHE: &'static str = "NalimovCache"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the ponder option
|
|
|
|
|
|
|
|
pub const PONDER: &'static str = "Ponder"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the OwnBook option
|
|
|
|
|
|
|
|
pub const OWNBOOK: &'static str = "OwnBook"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the MultiPV option
|
|
|
|
|
|
|
|
pub const MULTIPV: &'static str = "MultiPV"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the UCI_ShowCurrLine option
|
|
|
|
|
|
|
|
pub const UCISHOWCURRLINE: &'static str = "UCI_ShowCurrLine"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the UCI_Refutations option
|
|
|
|
|
|
|
|
pub const UCISHOWREFUTATIONS: &'static str = "UCI_ShowRefutations"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the UCI_LimitStrength option
|
|
|
|
|
|
|
|
pub const UCISHOWREFUTATIONS: &'static str = "UCI_LimitStrength"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the UCI_Elo option
|
|
|
|
|
|
|
|
pub const UCIELO: &'static str = "UCI_Elo"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the UCI_AnalysisMode option
|
|
|
|
|
|
|
|
pub const UCIANALYSISMODE: &'static str = "UCI_AnalysisMode"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Represents the UCI_Opponent option
|
|
|
|
|
|
|
|
pub const UCIOPPONENT: &'static str = "UCI_Opponent"; |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug)] |
|
|
|
#[derive(Debug)] |
|
|
|
/// The `EngineOptionType` type used to indicate what type of option the GUI should display
|
|
|
|
/// The `EngineOptionType` type used to indicate what type of option the GUI should display
|
|
|
|
enum EngineOptionType { |
|
|
|
enum EngineOptionType { |
|
|
@ -32,7 +68,7 @@ struct EngineOptionDataValue<T> { |
|
|
|
#[derive(Debug, PartialEq)] |
|
|
|
#[derive(Debug, PartialEq)] |
|
|
|
/// The `EngineOption` type is the overarching type representing a single configurable engine option
|
|
|
|
/// The `EngineOption` type is the overarching type representing a single configurable engine option
|
|
|
|
struct EngineOption<T> { |
|
|
|
struct EngineOption<T> { |
|
|
|
name: String, |
|
|
|
name: &'static str, |
|
|
|
option_type: EngineOptionType, |
|
|
|
option_type: EngineOptionType, |
|
|
|
option_data: HashMap<EngineOptionDataType, EngineOptionDataValue<T>>, |
|
|
|
option_data: HashMap<EngineOptionDataType, EngineOptionDataValue<T>>, |
|
|
|
} |
|
|
|
} |
|
|
|