|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfreerails.move.ChangeProductionAtEngineShopMove
public class ChangeProductionAtEngineShopMove
This Move changes what is being built at an engine shop - when a client wants to build a train, it should send an instance of this class to the server.
| Field Summary | |
|---|---|
private ImList<PlannedTrain> |
after
|
private ImList<PlannedTrain> |
before
|
private FreerailsPrincipal |
principal
|
private static long |
serialVersionUID
|
private int |
stationNumber
|
| Constructor Summary | |
|---|---|
ChangeProductionAtEngineShopMove(ImList<PlannedTrain> b,
ImList<PlannedTrain> a,
int station,
FreerailsPrincipal p)
|
|
| Method Summary | |
|---|---|
MoveStatus |
doMove(World w,
FreerailsPrincipal p)
Executes this move on the specifed world object. |
boolean |
equals(java.lang.Object o)
|
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. |
private MoveStatus |
tryMove(World w,
ImList<PlannedTrain> stateA)
|
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 ImList<PlannedTrain> before
private final ImList<PlannedTrain> after
private final int stationNumber
private final FreerailsPrincipal principal
| Constructor Detail |
|---|
public ChangeProductionAtEngineShopMove(ImList<PlannedTrain> b,
ImList<PlannedTrain> a,
int station,
FreerailsPrincipal p)
| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public MoveStatus tryDoMove(World w,
FreerailsPrincipal p)
Move
tryDoMove in interface Move
private MoveStatus tryMove(World w,
ImList<PlannedTrain> stateA)
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)
MovedoMove 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||