|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfreerails.server.ServerGameModelImpl
public class ServerGameModelImpl
A ServerGameModel that contains the automations used in the actual game.
Field Summary | |
---|---|
private CalcSupplyAtStations |
calcSupplyAtStations
|
private MoveReceiver |
moveExecuter
|
private long |
nextModelUpdateDue
|
private java.lang.String[] |
passwords
|
private static long |
serialVersionUID
|
private java.util.Vector<ServerAutomaton> |
serverAutomata
List of the ServerAutomaton objects connected to this game. |
private TrainUpdater |
tb
|
private int |
ticksSinceUpdate
Number of ticks since the last time we did an infrequent update. |
World |
world
|
Constructor Summary | |
---|---|
ServerGameModelImpl()
|
|
ServerGameModelImpl(World w,
java.util.Vector<ServerAutomaton> serverAutomata)
|
Method Summary | |
---|---|
java.lang.String[] |
getPasswords()
|
World |
getWorld()
|
void |
init(MoveReceiver newMoveExecuter)
|
private void |
monthEnd()
This is called at the start of each new month. |
void |
setWorld(World w,
java.lang.String[] passwords)
|
void |
update()
|
private void |
updateGameTime()
|
void |
write(java.io.ObjectOutputStream objectOut)
|
private void |
yearEnd()
This is called on the last tick of each year. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public World world
private transient CalcSupplyAtStations calcSupplyAtStations
private TrainUpdater tb
private java.lang.String[] passwords
private final java.util.Vector<ServerAutomaton> serverAutomata
private int ticksSinceUpdate
private transient long nextModelUpdateDue
private transient MoveReceiver moveExecuter
Constructor Detail |
---|
public ServerGameModelImpl()
public ServerGameModelImpl(World w, java.util.Vector<ServerAutomaton> serverAutomata)
Method Detail |
---|
private void yearEnd()
private void monthEnd()
private void updateGameTime()
public void update()
update
in interface GameModel
public void write(java.io.ObjectOutputStream objectOut) throws java.io.IOException
write
in interface ServerGameModel
java.io.IOException
public void init(MoveReceiver newMoveExecuter)
init
in interface ServerGameModel
public World getWorld()
getWorld
in interface ServerGameModel
public void setWorld(World w, java.lang.String[] passwords)
setWorld
in interface ServerGameModel
public java.lang.String[] getPasswords()
getPasswords
in interface ServerGameModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |