public class GameState extends java.lang.Object implements HuntState, ScramState
Modifier and Type | Field and Description |
---|---|
static long |
ES_TIMEOUT |
static long |
EX_TIMEOUT |
static double |
MAX_BONUS |
static int |
MAX_COLS |
static int |
MAX_ROWS |
static double |
MIN_BONUS |
static int |
MIN_COLS |
static int |
MIN_ROWS |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Node> |
allNodes()
Return a collection containing all the nodes in the graph.
|
long |
currentLocation()
Return the unique id of the current location.
|
Node |
currentNode()
Return the Node corresponding to Indiana's location in the graph.
|
int |
distanceToOrb()
Return the Manhattan distance from the current location to the target location on the map.
|
Node |
getExit()
Return the Node associated with the exit from the cavern.
|
void |
grabGold()
Pick up the gold on the current tile.
|
static void |
main(java.lang.String[] args) |
void |
moveTo(long id)
See moveTo(Node<TileData> n)
|
void |
moveTo(Node n)
Attempt to move the explorer from the current position to
the Node n.
|
java.util.Collection<NodeStatus> |
neighbors()
Return a collection of NodeStatus objects that contain the unique ID of the node
and the distance from that node to the target.
|
static int |
runNewGame(long seed,
boolean useGui,
Explorer solution)
Given seed, whether or not to use the GUI, and an instance of a solution to use,
run the game.
|
int |
stepsLeft()
Return the steps remaining to get out of the cavern.
|
public static final int MIN_ROWS
public static final int MAX_ROWS
public static final int MIN_COLS
public static final int MAX_COLS
public static final long EX_TIMEOUT
public static final long ES_TIMEOUT
public static final double MIN_BONUS
public static final double MAX_BONUS
public void moveTo(long id)
public long currentLocation()
currentLocation
in interface HuntState
public java.util.Collection<NodeStatus> neighbors()
public int distanceToOrb()
distanceToOrb
in interface HuntState
public Node currentNode()
ScramState
currentNode
in interface ScramState
public Node getExit()
ScramState
getExit
in interface ScramState
public java.util.Collection<Node> allNodes()
ScramState
allNodes
in interface ScramState
public void moveTo(Node n)
moveTo
in interface ScramState
public void grabGold()
ScramState
grabGold
in interface ScramState
public int stepsLeft()
ScramState
stepsLeft
in interface ScramState
public static int runNewGame(long seed, boolean useGui, Explorer solution)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException