|
||||||||||
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 |
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_m, GOODY_n, GOODY_o, GOODY_p, GOODY_q, GOODY_r, GOODY_s, 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 |
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 |
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
Constructor Detail |
---|
public C_World(D_GameInfo gameInfo, GameParameter parameter)
gameInfo
- Method Detail |
---|
private void placeGoody(D_GameInfo gameInfo)
gameInfo
- 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 |