#ifndef SEARCHHEURISTIC_H #define SEARCHHEURISTIC_H #include "MasterMind.h" struct Candidate { Candidate(int* s, int v) { sol = s; value = v; } int* sol; int value; }; struct { bool operator()(Candidate* a, Candidate* b) const { return a->value > b->value; } } cmp_candidates; struct Result { Result(int* s, int v, int c) { solution = s; v_solution = v; nb_calls = c; } int* solution; int v_solution; int nb_calls; }; class SearchHeuristic { public: SearchHeuristic(); virtual Result run() = 0; void set_problem(MasterMind* problem); virtual ~SearchHeuristic(); protected: MasterMind* m_problem; private: }; #endif // SEARCHHEURISTIC_H