|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.farafin.snEADy.world.C_World
public final class C_World
this class contains all calculations of the play field. If something moves or runns against a wall, in world its the place where its calculated.
Field Summary | |
---|---|
private C_Arena |
arena
arena of the game |
private long |
lastSDTime
only one segment per cycle |
private long |
nextGoodyTime
next time a goody occures |
private GameParameter |
parameter
parameter set of GameParameter |
private java.util.Random |
randGoody
computes the kind of goody than should placed |
private java.util.Random |
randNextGoodyTime
computes the next time a goody occures |
private byte[] |
recBuffer
the computed bytes for the record |
private long |
recExitTime
comparing exit time for records |
private D_Level |
recLevel
comparing level for records |
private D_PlayerData[] |
recPlayerData
comparing player data for records: |
private long |
recSDTime
comparing sd time for records |
Fields inherited from interface de.farafin.snEADy.communication.I_PlayFieldConstants |
---|
EXIT, FIELD_B, FIELD_C, FIELD_D, FIELD_E, FIELD_F, FIELD_G, FIELD_H, FIELD_I, FIELD_J, FIELD_K, FIELD_L, FIELD_M, FIELD_N, FIELD_O, FIELD_P, FIELD_Q, FIELD_R, FIELD_S, FIELD_T, FIELD_U, FIELD_V, FIELD_W, FIELD_X, FIELD_Y, FIELD_Z, FREE, GOODY_f, GOODY_g, GOODY_h, GOODY_i, GOODY_j, GOODY_k, GOODY_l, GOODY_LAST, GOODY_m, GOODY_n, GOODY_o, GOODY_p, GOODY_q, GOODY_r, GOODY_s, GOODY_START, GOODY_t, GOODY_u, GOODY_v, GOODY_w, GOODY_x, GOODY_y, GOODY_z, LENGTH, PLAYER_0, PLAYER_1, PLAYER_2, PLAYER_3, PLAYER_4, PLAYER_5, PLAYER_6, PLAYER_7, PLAYER_8, PLAYER_9, POINTS, SHORT, SLOW, SPEED, WALL |
Fields inherited from interface de.farafin.snEADy.inOut.I_RecordConstants |
---|
byte_E, byte_EX, byte_H, byte_LE, byte_N, byte_P0, byte_P1, byte_P2, byte_P3, byte_P4, byte_P5, byte_P6, byte_P7, byte_P8, byte_P9, byte_PF, byte_PO, byte_S, byte_SP, byte_ST, byte_W |
Constructor Summary | |
---|---|
C_World(D_GameInfo gameInfo,
GameParameter parameter)
constructor |
Method Summary | |
---|---|
D_Level |
generateLevel()
|
private void |
placeGoody(D_GameInfo gameInfo)
sets a new goody and estimates the next goody time |
void |
recordGameCycle(D_GameInfo gameInfo)
computes the record of a game cycle (level + player => recordFile) WARNING there are no control routines if the numbers fit to its range because we do not expact that this could happen in teh game. |
boolean |
replayGameCycle(D_GameInfo gameInfo,
D_PlayerData[] playerData)
computes the replay of a game cycle (replayFile => level + player) |
boolean |
replayGameCycle1011(D_GameInfo gameInfo,
D_PlayerData[] playerData)
replay vis snEADy version 1.011 |
boolean |
replayGameCycle1012(D_GameInfo gameInfo,
D_PlayerData[] playerData)
replay vis snEADy version 1.012 |
void |
update(D_GameInfo gameInfo)
calculate the new playfield with the informations in gameInfo stores the changed data in gameInfo |
void |
updateInfos(D_GameInfo gameInfo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final C_Arena arena
private long nextGoodyTime
private java.util.Random randNextGoodyTime
private java.util.Random randGoody
private final GameParameter parameter
private long lastSDTime
private D_PlayerData[] recPlayerData
C_LogFileWriter
,
C_LogFileReader
,
D_PlayerData
private D_Level recLevel
private long recExitTime
private long recSDTime
private byte[] recBuffer
Constructor Detail |
---|
public C_World(D_GameInfo gameInfo, GameParameter parameter)
gameInfo
- parameter
- Method Detail |
---|
private void placeGoody(D_GameInfo gameInfo)
gameInfo
- public void recordGameCycle(D_GameInfo gameInfo)
I_World_interface
recordGameCycle
in interface I_World_interface
public boolean replayGameCycle(D_GameInfo gameInfo, D_PlayerData[] playerData)
I_World_interface
replayGameCycle
in interface I_World_interface
I_World_interface.updateInfos(de.farafin.snEADy.communication.D_GameInfo)
public boolean replayGameCycle1011(D_GameInfo gameInfo, D_PlayerData[] playerData)
gameInfo
- playerData
-
public boolean replayGameCycle1012(D_GameInfo gameInfo, D_PlayerData[] playerData)
gameInfo
- playerData
-
public void update(D_GameInfo gameInfo)
I_World_interface
update
in interface I_World_interface
public D_Level generateLevel()
generateLevel
in interface I_World_interface
public void updateInfos(D_GameInfo gameInfo)
updateInfos
in interface I_World_interface
gameInfo
- a instance the informations should be filled in
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |