Class FixedTreasureHider
- java.lang.Object
-
- com.treasure.hunt.strategy.hider.impl.StatisticalHider
-
- com.treasure.hunt.strategy.hider.impl.FixedTreasureHider
-
public class FixedTreasureHider extends StatisticalHider implements Hider<AngleHint>
A Strategy using theStatisticalHideras Base Implementation, using theGameFieldto maintain its state
-
-
Field Summary
-
Fields inherited from class com.treasure.hunt.strategy.hider.impl.StatisticalHider
absoluteAreaCutoff, badHintWeight_Preference, centroidDistanceToTreasure, counterStrategyGeometryCutoff, currentPossibleArea, DistanceFromNormalAngleLineToTreasureWeight_Preference, distanceFromNormalAngleRay, DistanceFromResultingCentroidToTreasureWeight_Preference, gameField, gf, preferredHintSize, relativeAreaCutoff, relativeAreaCutoffWeight_Preference, startingPoint, treasure
-
-
Constructor Summary
Constructors Constructor Description FixedTreasureHider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.PointgetTreasureLocation()This method will be invoked at the start of the Game.protected doublerateHint(AngleHintStatistic ahs)Rates the Given Hint with a custom function, saves the result in the AngleHintStatistic - Wrapper and returns the result-
Methods inherited from class com.treasure.hunt.strategy.hider.impl.StatisticalHider
eval, fillDistanceToCentroid, fillDistanceToNormalLine, filterForValidHints, generateHints, init, move
-
-
-
-
Method Detail
-
rateHint
protected double rateHint(AngleHintStatistic ahs)
Description copied from class:StatisticalHiderRates the Given Hint with a custom function, saves the result in the AngleHintStatistic - Wrapper and returns the result- Specified by:
rateHintin classStatisticalHider- Parameters:
ahs- The AngleHint - Wrapper , in which the result is saved- Returns:
- the rating of the hint
-
getTreasureLocation
public org.locationtech.jts.geom.Point getTreasureLocation()
This method will be invoked at the start of the Game. it returns the initial treasure location. Since hider does not move the treasure, any further calls to this method will return the same result.- Specified by:
getTreasureLocationin interfaceHider<AngleHint>- Overrides:
getTreasureLocationin classStatisticalHider- Returns:
- the point the treasure is located at
-
-