#ifndef __SGENGINE_H_
#define __SGENGINE_H_

#include "Definitions.h"
#include "ProblemDomain.h"
#include "Population.h"

#define VERBOSE
#ifdef VERBOSE
#include <cstdio>
#endif

class SgEngine {
  private:
    ProblemDomain * const problem;
    Population population;
		unsigned generationCount;
		FloatType bestFitness;
		AlleleType * const bestIndividual;
    AlleleType * const individualOne;
    AlleleType * const individualTwo;
    const size_t sizeOfIndividual;

  public:
    SgEngine( ProblemDomain *p );
    ~SgEngine();
    const Population * const getPopulation() const;
    const AlleleType * const getBestIndividual() const;
		void printBestIndividual(bool isNew) const;
    FloatType getBestFitness() const;
    unsigned getGenerationCount() const;

    void doOneGeneration(bool verbose);
};

#endif /* __SGENGINE_H_ */
