summaryrefslogtreecommitdiff
path: root/src/uci/state.h
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-07-04 22:34:17 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-07-04 22:34:17 +0530
commitf17df9538b1c3f58f12b738083b747ac332b8d71 (patch)
tree4df4254a726cd009a26eb3d9cd7e6d28b1a9c9a5 /src/uci/state.h
parent8535106616ccdc9f52c29ce7f46555e613c38b6e (diff)
the setoption now changes state
i can now finally start working on how the non existant engine will interact with uci
Diffstat (limited to 'src/uci/state.h')
-rw-r--r--src/uci/state.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/uci/state.h b/src/uci/state.h
index 98b42dd..fd24b7e 100644
--- a/src/uci/state.h
+++ b/src/uci/state.h
@@ -8,10 +8,7 @@ typedef struct {
typedef bool check_t;
typedef int spin_t;
-typedef struct {
- str_t* combinations;
- int chosen_option;
-} combo_t;
+typedef int combo_t;
// the button isn't actually a value thing
// it's more like an event.
// so we parse a button type, we set this to true, handle it
@@ -38,35 +35,50 @@ typedef struct {
bool check_default;
const char* string_default;
} data;
+ union {
+ combo_t *combo;
+ spin_t *spin;
+ check_t *check;
+ str_t *string;
+ button_t *button;
+ } value;
} option_setting_t;
option_setting_t option_setting_combo(
char* option_name,
char** combinations,
int combinations_count,
- int default_index
+ int default_index,
+ combo_t *combo
);
option_setting_t option_setting_spin(
const char* option_name,
int min,
int max,
- int default_value
+ int default_value,
+ spin_t *spin
);
option_setting_t option_setting_check(
const char* option_name,
- bool default_value
+ bool default_value,
+ check_t *check
);
option_setting_t option_setting_string(
const char* option_name,
- const char* default_value
+ const char* default_value,
+ str_t *string
+);
+option_setting_t option_setting_button(
+ const char* option_name,
+ button_t *button
);
-option_setting_t option_setting_button(const char* option_name);
typedef struct {
char name[32];
char author[32];
+ bool debug;
- option_setting_t option_settings[10];
+ option_setting_t option_settings[11];
// options
spin_t threads;