public class Robber
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Hex |
placedOn |
private static long |
serialVersionUID |
Constructor and Description |
---|
Robber(Hex placeOn)
Creates a robber object and associates it with a hex.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Hex |
GetHex()
Gets the hex that the robber is on.
|
int |
hashCode() |
boolean |
isOnHex(Hex hex)
Determines if the robber is on a certain hex.
|
void |
setRobber(Hex placeOn)
Moves the robber to a new hex.
|
private static final long serialVersionUID
private Hex placedOn
public Robber(Hex placeOn)
placeOn
- The hex the robber will be started on.public void setRobber(Hex placeOn)
placeOn
- The hex to move the robber to.public boolean isOnHex(Hex hex)
hex
- The hex in question.public Hex GetHex()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object