Class: Grimoire::UnitScoreKeeper
- Defined in:
- lib/grimoire/unit_score_keeper.rb
Instance Method Summary collapse
-
#preferred_score ⇒ Symbol
Define meaning of score by what should be preferred.
-
#score_for(unit, idx, opts = {}) ⇒ Numeric
Provide score for given unit.
Methods inherited from Utility
Constructor Details
This class inherits a constructor from Grimoire::Utility
Instance Method Details
#preferred_score ⇒ Symbol
Define meaning of score by what should be preferred. This is used by the solver to apply correct sorting to the queues.
10 11 12 |
# File 'lib/grimoire/unit_score_keeper.rb', line 10 def preferred_score :lowscore end |
#score_for(unit, idx, opts = {}) ⇒ Numeric
Provide score for given unit
21 22 23 |
# File 'lib/grimoire/unit_score_keeper.rb', line 21 def score_for(unit, idx, opts={}) raise NotImplementedError.new 'No scoring has been defined' end |