|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfreerails.move.AddTransactionMove
public class AddTransactionMove
This Move
adds a Transaction
to a players bank account on the
World
object.
Field Summary | |
---|---|
private boolean |
constrained
Whether the move fails if there is not enough cash. |
private FreerailsPrincipal |
principal
|
private static long |
serialVersionUID
|
private Transaction |
transaction
|
Constructor Summary | |
---|---|
AddTransactionMove(FreerailsPrincipal account,
Transaction t)
|
|
AddTransactionMove(FreerailsPrincipal account,
Transaction t,
boolean constrain)
|
Method Summary | |
---|---|
MoveStatus |
doMove(World w,
FreerailsPrincipal p)
Executes this move on the specifed world object. |
boolean |
equals(java.lang.Object obj)
|
FreerailsPrincipal |
getPrincipal()
|
Transaction |
getTransaction()
|
int |
hashCode()
|
MoveStatus |
tryDoMove(World w,
FreerailsPrincipal p)
Tests whether this Move can be executed on the specifed world object, this method should leave the world object unchanged. |
MoveStatus |
tryUndoMove(World w,
FreerailsPrincipal p)
Tests whether this Move can be undone on the specifed world object, this method should leave the world object unchanged. |
MoveStatus |
undoMove(World w,
FreerailsPrincipal p)
If doMove has just been executed on the specified world
object, calling this method changes the state of the world object back to
how it was before doMove was called. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private final Transaction transaction
private final FreerailsPrincipal principal
private final boolean constrained
Constructor Detail |
---|
public AddTransactionMove(FreerailsPrincipal account, Transaction t)
public AddTransactionMove(FreerailsPrincipal account, Transaction t, boolean constrain)
Method Detail |
---|
public Transaction getTransaction()
public int hashCode()
hashCode
in class java.lang.Object
public MoveStatus tryDoMove(World w, FreerailsPrincipal p)
Move
tryDoMove
in interface Move
public MoveStatus tryUndoMove(World w, FreerailsPrincipal p)
Move
tryUndoMove
in interface Move
public MoveStatus doMove(World w, FreerailsPrincipal p)
Move
doMove
in interface Move
public MoveStatus undoMove(World w, FreerailsPrincipal p)
Move
doMove
has just been executed on the specified world
object, calling this method changes the state of the world object back to
how it was before doMove
was called.
undoMove
in interface Move
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public FreerailsPrincipal getPrincipal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |