@@ -94,7 +94,7 @@ void Engine::print_help(const string_view args) const
9494 print_command_table (customCommands);
9595}
9696
97- void Engine::print_options () const
97+ void Engine::print_options ()
9898{
9999 println (" " );
100100 println (" The following UCI options are supported:" );
@@ -108,26 +108,31 @@ void Engine::print_options() const
108108 .append_column (" Default" )
109109 .append_column (" Current" );
110110
111- for (const auto * option : options) {
112- table.new_row ()
113- .append_column (option->get_name ())
114- .append_column (option->get_type ())
115- .append_column (option->get_help ());
116-
117- if (option->has_value ()) {
118- std::visit (
119- [&table](auto defaultValue) {
120- table.append_column (std::format (" {}" , defaultValue));
121- },
122- option->get_default_value_variant ());
123-
124- std::visit (
125- [&table](auto value) {
126- table.append_column (std::format (" {}" , value));
127- },
128- option->get_value_variant ());
111+ auto add_options = [&table](const OptionList opts) {
112+ for (const auto * option : opts) {
113+ table.new_row ()
114+ .append_column (option->get_name ())
115+ .append_column (option->get_type ())
116+ .append_column (option->get_help ());
117+
118+ if (option->has_value ()) {
119+ std::visit (
120+ [&table](auto defaultValue) {
121+ table.append_column (std::format (" {}" , defaultValue));
122+ },
123+ option->get_default_value_variant ());
124+
125+ std::visit (
126+ [&table](auto value) {
127+ table.append_column (std::format (" {}" , value));
128+ },
129+ option->get_value_variant ());
130+ }
129131 }
130- }
132+ };
133+
134+ add_options (get_standard_uci_options ());
135+ add_options (options);
131136
132137 print_colored_table (table);
133138
0 commit comments