Sha256: aeaba614847a8aba94e29f6123541c1fb6d1b4da13cec2cb7f23d90579f1a8c6

Contents?: true

Size: 838 Bytes

Versions: 4

Compression:

Stored size: 838 Bytes

Contents

#ifndef AI_LOADER_H
#define AI_LOADER_H

#include "../../khetai_lib.h"
#include <dlfcn.h>
#include <stdexcept>
#include <string>

class AILoader {
  public:
    AILoader(const std::string &lib_path);
    ~AILoader();

    void (*get_init_zobrist())();
    void (*get_reset_undo())();
    void (*get_setup_board())(char **);
    void (*get_print_board())();
    void (*get_set_time_parameters())(int, time_t);
    Move (*get_alphabeta_root())(int, enum Player);
    void (*get_make_move())(Move);
    int (*get_get_start())(Move);
    int (*get_get_end())(Move);
    int (*get_get_rotation())(Move);
    void reload_library(const std::string &lib_path);

  private:
    void *handle;
    void load_library(const std::string &lib_path);
    void *get_symbol(const std::string &symbol_name);
    void check_error();
};

#endif // AI_LOADER_H

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
khetai-0.3.4 ext/khetai/dev/fltk-ui/ai_loader.h
khetai-0.3.3 ext/khetai/dev/fltk-ui/ai_loader.h
khetai-0.3.2 ext/khetai/dev/fltk-ui/ai_loader.h
khetai-0.3.0 ext/khetai/dev/fltk-ui/ai_loader.h