|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.environments.pente.PenteAction
public class PenteAction
Describes a move in the Pente game.
Each move consists of the placement of a stone somewhere on the 19x19 grid.
Constructor Summary | |
---|---|
PenteAction(DiscretePoint2D theLocation)
Constructs a new PenteAction for placing a stone in the given location. |
|
PenteAction(int x,
int y)
Constructs a new PenteAction for placing a stone in the given x- and y- coordinates. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
DiscretePoint2D |
getLocation()
Returns the location on the 19x19 grid where the player is attempting to place a stone. |
int |
getTurnNumber()
Returns an integer indicating which player produced this move. |
int |
hashCode()
|
void |
setTurnNumber(int theTurnNumber)
Sets the turn number of an action. |
java.lang.String |
toString()
AgentActions should override toString() to provide a reasonable short description. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PenteAction(DiscretePoint2D theLocation)
theLocation
- public PenteAction(int x, int y)
x
- y
- Method Detail |
---|
public java.lang.String toString()
AgentAction
toString
in interface AgentAction
toString
in class java.lang.Object
public DiscretePoint2D getLocation()
public int getTurnNumber()
Players do not need to set this themselves -- it will be set as appropriate by the environment.
public void setTurnNumber(int theTurnNumber)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |