de.farafin.snEADy.communication
Class D_PlayerData

java.lang.Object
  extended by de.farafin.snEADy.communication.D_PlayerData
All Implemented Interfaces:
I_Constants, I_PlayFieldConstants

public final class D_PlayerData
extends java.lang.Object
implements I_PlayFieldConstants, I_Constants

Information about a given player to organize the information exchange between the modules of the game

Version:
$Revision: 1.34 $
Author:
roland, lars

Field Summary
 int delayChanged
          if the delay changed in the playfield 1: slower 0: no change -1: faster
 D_Vec2D headPos
          Comment for headPos
 int killPoints
          Comment for killPoints
 long lastCalculatedMemUsage
          Comment for lastCalculatedMemUsage
 int length
          Comment for length
 int lengthChanged
          if the length changed in the playfield 1: longer 0: no change -1: shorter
 boolean move
          when a player has finished his calculation, it will be updated, otherwise not
 java.lang.String name
          the name of the Player
 long nextUpdateTime
          the game time the object will be updated next time. if its negative, the object will never be updated
 char ownChar
          Comment for ownChar
 java.lang.String picFileName
          the name of the picfile
 java.lang.Class playerClass
          Comment for playerClass
 int snakeStatus
          Comment for snakeStatus
 boolean snakeUpdated
          true if the snake was updated in the playfield
 int turnDirection
          Comment for turnDirection
 long waitCycles
          the freuency with what the gaObject should be updated.
 int watchDirection
          Comment for watchDirection
 
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.communication.I_Constants
analyse_ms, auto_grow_delay, auto_slowdown_delay, autogamespeed, closemonitor, damage_length_grow, damage_points_radius, DEBUG, delplayer, easy_points, ejectreplay, emergencyPause, exit_time, FACE_EAST, FACE_NORTH, FACE_SOUTH, FACE_WEST, game_end, goody_length_occ, goody_length_value, goody_points_occ, goody_points_value, goody_shorter_occ, goody_shorter_value, goody_slowdown_occ, goody_speed_occ, IN_ACTION, IN_ERROR_EXC, IN_ERROR_INIT, IN_ERROR_SPACE, IN_ERROR_TIME, IN_EXIT, IN_HEAVEN, init_length, init_move_delay, kill, kill_point_goodies, kill_points_radius, loaddummy, loadhuman, loadlevel, loadplayer, loadscript, logging, max_goody_occ_delay, MAX_HUMAN_PLAYERS, max_mem_check_delay, max_move_delay, max_player_mem, MAX_PLAYERS, max_thinking_ms, memkill, min_cycle_ms, min_move_delay, MOVE_EAST, MOVE_NORTH, MOVE_SOUTH, MOVE_WEST, openmonitor, overalldelay, pause, player_controlling, print_calc_ms, print_parameter, print_player_mem, print_playfield, quit, record, recordname, replay, replay_reverse, replay_stepwidth, replay_stepwise, run, set, show_subcycles, start, stop, suddend_time, survival_points, timekill, tolerance_ms, TURN_LEFT, TURN_NONE, TURN_RIGHT
 
Constructor Summary
D_PlayerData()
          default - constructor
D_PlayerData(D_PlayerData pData)
          copy - constructor reference-copy of attrbutes: use copy() if you need a full copy
D_PlayerData(int playerNo, java.lang.Class playerClass, GameParameter params)
           
D_PlayerData(int playerNo, java.lang.Class playerClass, java.lang.String name, GameParameter params)
           
D_PlayerData(java.lang.String name, java.lang.String picFileName, long nextupdateTime, long waitCycles, int killPoints, int turnDirection, int watchDirection, char ownChar, int length, D_Vec2D headPos, java.lang.Class playerClass)
           
 
Method Summary
 java.lang.Object clone()
           
 void copyOnMe(D_PlayerData plData)
          copyes the local data to plData. its no new instance created!
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
the name of the Player


picFileName

public java.lang.String picFileName
the name of the picfile


nextUpdateTime

public long nextUpdateTime
the game time the object will be updated next time. if its negative, the object will never be updated


snakeUpdated

public boolean snakeUpdated
true if the snake was updated in the playfield


lengthChanged

public int lengthChanged
if the length changed in the playfield 1: longer 0: no change -1: shorter


delayChanged

public int delayChanged
if the delay changed in the playfield 1: slower 0: no change -1: faster


waitCycles

public long waitCycles
the freuency with what the gaObject should be updated. if its negative, the nextUpdateTime never changes


killPoints

public int killPoints
Comment for killPoints


turnDirection

public int turnDirection
Comment for turnDirection


move

public boolean move
when a player has finished his calculation, it will be updated, otherwise not


watchDirection

public int watchDirection
Comment for watchDirection


ownChar

public char ownChar
Comment for ownChar


length

public int length
Comment for length


headPos

public D_Vec2D headPos
Comment for headPos


snakeStatus

public int snakeStatus
Comment for snakeStatus


playerClass

public java.lang.Class playerClass
Comment for playerClass


lastCalculatedMemUsage

public long lastCalculatedMemUsage
Comment for lastCalculatedMemUsage

Constructor Detail

D_PlayerData

public D_PlayerData()
default - constructor


D_PlayerData

public D_PlayerData(java.lang.String name,
                    java.lang.String picFileName,
                    long nextupdateTime,
                    long waitCycles,
                    int killPoints,
                    int turnDirection,
                    int watchDirection,
                    char ownChar,
                    int length,
                    D_Vec2D headPos,
                    java.lang.Class playerClass)
Parameters:
name -
picFileName -
nextupdateTime -
waitCycles -
killPoints -
turnDirection -
watchDirection -
ownChar -
length -
headPos -
playerClass -

D_PlayerData

public D_PlayerData(int playerNo,
                    java.lang.Class playerClass,
                    GameParameter params)
Parameters:
playerNo -
playerClass -
params -

D_PlayerData

public D_PlayerData(int playerNo,
                    java.lang.Class playerClass,
                    java.lang.String name,
                    GameParameter params)
Parameters:
playerNo -
playerClass -
name -
params -

D_PlayerData

public D_PlayerData(D_PlayerData pData)
copy - constructor reference-copy of attrbutes: use copy() if you need a full copy

Parameters:
pData -
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

copyOnMe

public void copyOnMe(D_PlayerData plData)
copyes the local data to plData. its no new instance created!

Parameters:
plData -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object