#pragma once #include #include "SDL2/SDL.h" #include "board.hpp" class Game { public: Game(SDL_Window* window, SDL_Surface* surface); Game(SDL_Window* window, SDL_Surface* surface, std::string board_fen); void run(); private: void tick(); void draw(); void process_click(int x, int y); int do_ai_move(); static int minimax(Board current_board, int depth, int max_depth, int a, int b, bool maximizing); static void minimax_evaluate(std::mutex& mut_result_check, Board current_board, int x, int y, int depth, int max_depth, int& best_move_weight, int& a, int& b, bool& a_eject, bool& b_eject, bool maximizing); static int board_heuristic(Board current_board); SDL_Window* window; SDL_Surface* surface; Board board; bool running; bool holding_k; };