Class HorizontalHalfPlaneHintHider
- java.lang.Object
-
- com.treasure.hunt.strategy.hider.impl.HorizontalHalfPlaneHintHider
-
- All Implemented Interfaces:
Hider<HalfPlaneHint>
public class HorizontalHalfPlaneHintHider extends java.lang.Object implements Hider<HalfPlaneHint>
This kind ofHider
only givesHalfPlaneHint
's, which are parallel to the X-axis.
-
-
Constructor Summary
Constructors Constructor Description HorizontalHalfPlaneHintHider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.Point
getTreasureLocation()
void
init(org.locationtech.jts.geom.Point searcherStartPosition)
This initialization does nothing and ignores thesearcherStartPosition
.HalfPlaneHint
move(SearchPath searchPath)
-
-
-
Method Detail
-
init
public void init(org.locationtech.jts.geom.Point searcherStartPosition)
This initialization does nothing and ignores thesearcherStartPosition
.- Specified by:
init
in interfaceHider<HalfPlaneHint>
- Parameters:
searcherStartPosition
- theSearcher
starting position
-
move
public HalfPlaneHint move(SearchPath searchPath)
- Specified by:
move
in interfaceHider<HalfPlaneHint>
- Parameters:
searchPath
- theSearchPath
, theSearcher
did last- Returns:
- A valid
HalfPlaneHint
which are parallel to the X-axis.
-
getTreasureLocation
public org.locationtech.jts.geom.Point getTreasureLocation()
- Specified by:
getTreasureLocation
in interfaceHider<HalfPlaneHint>
- Returns:
- A random treasure location via
JTSUtils.shuffleTreasure()
.
-
-