Class HotColdSolver
- java.lang.Object
-
- net.runelite.client.plugins.cluescrolls.clues.hotcold.HotColdSolver
-
public class HotColdSolver extends Object
Solution finder for hot-cold style puzzles.These puzzles are established by having some way to test the distance from the solution via "warmth", where being colder means one is farther away from the target, and being warmer means one is closer to it, with the goal being to reach the most warm value to discover the solution point. Hot-cold puzzles in Old School RuneScape are implemented with specific set of solution points, so this solver will filter from a provided set of possible solutions as new signals of temperatures and temperature changes are provided.
-
-
Constructor Summary
Constructors Constructor Description HotColdSolver(Set<HotColdLocation> possibleLocations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorldPoint
getLastWorldPoint()
Set<HotColdLocation>
getPossibleLocations()
Set<HotColdLocation>
signal(WorldPoint worldPoint, HotColdTemperature temperature, HotColdTemperatureChange temperatureChange)
Process a hot-cold update given aWorldPoint
where a check occurred and the resulting temperature and temperature change discovered at that point.
-
-
-
Constructor Detail
-
HotColdSolver
public HotColdSolver(Set<HotColdLocation> possibleLocations)
-
-
Method Detail
-
signal
public Set<HotColdLocation> signal(@Nonnull WorldPoint worldPoint, @Nonnull HotColdTemperature temperature, @Nullable HotColdTemperatureChange temperatureChange)
Process a hot-cold update given aWorldPoint
where a check occurred and the resulting temperature and temperature change discovered at that point. This will filter the set of possible locations which can be the solution.- Parameters:
worldPoint
- The point where a hot-cold check occurredtemperature
- The temperature of the checked pointtemperatureChange
- The change of temperature of the checked point compared to the previously-checked point- Returns:
- A set of
HotColdLocation
s which are still possible after the filtering occurs. This return value is the same as would be returned bygetPossibleLocations()
.
-
getPossibleLocations
public Set<HotColdLocation> getPossibleLocations()
-
getLastWorldPoint
@Nullable public WorldPoint getLastWorldPoint()
-
-