36 std::unique_ptr<Socket> m_socket =
nullptr;
38 std::thread m_listen_thread;
42 std::shared_ptr<spdlog::logger> m_log;
43 mutable std::mutex m_state_mutex;
44 std::atomic<bool> m_listening{
false};
45 std::chrono::steady_clock::time_point m_game_start;
51 [[nodiscard]]
bool has_phases()
const;
54 [[nodiscard]] std::optional<std::string> get_next_best_phase();
64 [[nodiscard]]
double compute_potential(
const Phase &phase_candidate)
const;
73 void update_phase_status(
Phase &phase)
const;
78 [[nodiscard]]
int time_remaining()
const;
90 void execute_init(
const std::function<
void()> &action);
115 const std::string &table_state_config_path,
116 const std::string &phase_state_config_path);
130 void run(
const std::unordered_map<std::string, std::function<
void()> > &actions);
void run(const std::unordered_map< std::string, std::function< void()> > &actions)
GameState(GameState &&other) noexcept
static GameState connect_client(const std::string &ip, uint16_t port)
void mutate_shared_state(const std::string &key, std::any value)
static GameState connect_server(const std::string &game_state_config_path, const std::string &table_state_config_path, const std::string &phase_state_config_path)
T read_shared_state(const std::string &key) const
GameState(TableState table_state, const Config &config, PhaseState phase_state)
Definition PhaseState.h:5
Definition TableState.h:6
Definition GameState.h:12
double Kt
Definition GameState.h:20
double Kp
Definition GameState.h:16
double Kpt
Definition GameState.h:24