From 1ed8db0234f9a273e07b7350e53ad230c5b62ce6 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 11 Dec 2022 21:37:15 +0100 Subject: week 5 klaar --- oop2w5/BlackboardStrategy.h | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 oop2w5/BlackboardStrategy.h (limited to 'oop2w5/BlackboardStrategy.h') diff --git a/oop2w5/BlackboardStrategy.h b/oop2w5/BlackboardStrategy.h new file mode 100644 index 0000000..9ab391a --- /dev/null +++ b/oop2w5/BlackboardStrategy.h @@ -0,0 +1,47 @@ +#pragma once + +/* + * DO NOT ADAPT THIS FILE!!! + */ + +class BlackboardStrategy +{ +public: + BlackboardStrategy(); + virtual ~BlackboardStrategy(); + +public: + virtual unsigned fitnessStrategy1() const; + virtual unsigned fitnessStrategy2() const; + virtual unsigned fitnessStrategy3() const; + virtual unsigned fitnessStrategy4() const; + virtual unsigned fitnessStrategy5() const; + virtual unsigned fitnessStrategy6() const; + +public: + virtual unsigned resultStrategy1() const; + virtual unsigned resultStrategy2() const; + virtual unsigned resultStrategy3() const; + virtual unsigned resultStrategy4() const; + virtual unsigned resultStrategy5() const; + virtual unsigned resultStrategy6() const; + +public: + virtual void initialize(); + virtual void setBestStrategy( unsigned ); + virtual void setBestResult( unsigned ); + +public: + virtual unsigned getBestStrategy() const; + virtual unsigned getBestResult() const; + +private: + virtual unsigned fitnessStrategy( unsigned ) const; + virtual unsigned resultStrategy( unsigned ) const; + + virtual unsigned value( unsigned, unsigned ) const; + +private: + unsigned m_uBestStrategy; // contains the best strategy, i.e. value 1 to 6 + unsigned m_uBestResult; // contains the best (i.e. highest) value of the result +}; -- cgit v1.2.3