From 7695d67a57811bb0f5a09adc1320b845a5784492 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 10 May 2013 09:16:55 +0200 Subject: digital/io-hub/src/apbirthday: avoid to take the same decision twice --- digital/io-hub/src/apbirthday/strat.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'digital/io-hub/src/apbirthday/strat.hh') diff --git a/digital/io-hub/src/apbirthday/strat.hh b/digital/io-hub/src/apbirthday/strat.hh index ad41e752..d56b0ef0 100644 --- a/digital/io-hub/src/apbirthday/strat.hh +++ b/digital/io-hub/src/apbirthday/strat.hh @@ -107,6 +107,8 @@ class Strat int best_score); /// Compute score for gifts. int score_gifts (Position &pos); + /// Give malus for decision which was done lastly. + int chrono_malus (Decision decision); /// Compute score for candles between first and last. int candles_score (int first, int last); private: @@ -121,12 +123,16 @@ class Strat POS_GIFT_3 = 14, POS_NB = 15, }; + /// Score offset for any score. + static const int score_offset_ = 30000; /// Position of pre-computed destinations. vect_t pos_[POS_NB]; /// Score of pre-computed destinations. int pos_score_[POS_NB]; /// Last taken decision. Decision last_decision_; + /// Chrono when a decision was last taken. + int chrono_last_decision_[WAIT]; /// Number of candles tries. int candles_tries_; /// Last plate decision. -- cgit v1.2.3