public class Spy
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLocationName() |
boolean |
isAt(java.lang.String locationName) |
boolean |
move(java.lang.String playerLoc)
Prints the location of the spy if specified by reveal
Return false if spy has no moves to make
|
java.lang.String |
revealLocation() |
public Spy(SpyGraph g, int reveal)
g
- Graph of current gamereveal
- - number of steps after which the spy reveals himselfpublic boolean move(java.lang.String playerLoc)
playerLoc
- - current location of the playerpublic java.lang.String revealLocation()
public boolean isAt(java.lang.String locationName)
locationName
- name of potential nodepublic java.lang.String getLocationName()