de.farafin.snEADy
Class GameParameter

java.lang.Object
  extended by de.farafin.snEADy.GameParameter

public final class GameParameter
extends java.lang.Object

Author:
roland, lars

Field Summary
private  int analyse_ms
          at the beginning of the game (gameTime == 0), the player gets additinal time to analyse the board
private  int auto_grow_delay
          each auto_grow_delay number of world cycles, the snake grows by one segment
private  int auto_slowdown_delay
          each auto_slowdown_delay number of world cycles, the snakes waitCycles increase by one.
private  int autogamespeed
          whether the game speed should fit to human behavier or not.
private  float damage_length_grow
          The amount of segments (part of a segment) that a snake grows if an other snake runns into it.
private  int damage_points_radius
          The Distance in which snakes gain points if an other snake looses a segment.
private  int easy_points
          if a snake bites it self, this number of points are given all snakes, that touches the biting snake at at least one segments.
private  long exit_time
          the game cycle the exit opens
private  int game_end
          0: game pauses at the end 1: game stops at the end 2: game quits at the end
private  long gameTime
          the internal counter of the game cycles
private  int goody_length_occ
          estimation that a new goody is a length goody. propability: goody_length_occ/Sum(goody_...
private  int goody_length_value
          the number of segments a snake gets longer, if it eats a length goody
private  int goody_points_occ
          estimation that a new goody is a points goody. propability: goody_points_occ/Sum(goody_...
private  int goody_points_value
          the number of points a snake gets, if it eats a points goody
private  int goody_shorter_occ
          estimation that a new goody is a shorter goody. propability: goody_points_occ/Sum(goody_...
private  int goody_shorter_value
          the number of segments a snake looses, if it eats a shorter goody
private  int goody_slowdown_occ
          estimation that a new goody is a slowdown goody. propability: goody_slowdown_occ/Sum(goody_...
private  int goody_speed_occ
          estimation that a new goody is a speed goody. propability: goody_speed_occ/Sum(goody_...
private  int init_length
          the initial length of the snakes
private  long init_move_delay
          The initial delay for snakes to move
private  int kill_point_goodies
          The number of goodies which spread out when a snake dies.
private  int kill_points_radius
          The Distance in which snakes gain points if an other snake dies.
private  int logging
          should the game be logged?
private  int max_goody_occ_delay
          the maximal time between two goody occurances.
private  int max_mem_check_delay
          the maximal delay of game cycles until the next players size is controlled
private  long max_move_delay
          The maximum delay for snakes to move
private  long max_player_mem
          maximal memory a player can allocate. if he needs more, he will be kicked.
private  int max_thinking_ms
          the maximal number of millisecondas a player should think
private  int memkill
          if the player should be killed if he needs more mem than he should
private  int min_cycle_ms
          the minimum time in milliseconds one game cycle should take.
private  long min_move_delay
          The minimum delay for snakes to move
private  int player_controlling
          if 0, the calculation will not be inside a thread Time and memory control will be disabled.
private  int print_calc_ms
          if 1 the time a player needed is printed into the console
private  int print_player_mem
          if 1 the memory usage a player needed is printed into the console
private  int record
          if 0 no record, if 1 record
private  java.lang.String recordName
          the name of the record..
private  int replay
          if 0 no replay, if 1 replay, if 2 its replay initialisation mode for spetial behaviour of some commands
private  int replay_reverse
          reverses the replay, so its running backwards
private  int replay_sneay_version
          the version of nseady with witch the replay was recorded
private  int replay_stepwidth
          the stepwidth of replays
private  int replay_stepwise
          eiter the replay should be showed stepwise or not
private  java.lang.String replayName
          the name of the replay
private  int show_subcycles
          if the graphical interface should actuialize the screan after each calculation of the game board
private  long suddend_time
          the game cycle the sudden death starts
private  int survival_points
          the number of points a player gets if he reaches the exit.
private  int timekill
          if the player should be killed if he needs longer than he should
private  int tolerance_ms
          after this milliseconds, the player is kicked if he still thinks
 
Constructor Summary
GameParameter()
           
 
Method Summary
 java.lang.Object clone()
           
 void copyOnMe(GameParameter param)
           
 int getAnalyse_ms()
           
 int getAuto_grow_delay()
           
 int getAuto_slowdown_delay()
           
 int getAutogamespeed()
           
 float getDamage_length_grow()
           
 int getDamage_points_radius()
           
 int getEasy_points()
           
 long getExit_time()
           
 int getGame_end()
           
 long getGameTime()
           
 int getGoody_length_occ()
           
 int getGoody_length_value()
           
 int getGoody_points_occ()
           
 int getGoody_points_value()
           
 int getGoody_shorter_occ()
           
 int getGoody_shorter_value()
           
 int getGoody_slowdown_occ()
           
 int getGoody_speed_occ()
           
 int getInit_length()
           
 long getInit_move_delay()
           
 int getKill_point_goodies()
           
 int getKill_points_radius()
           
 int getLogging()
           
 int getMax_goody_occ_delay()
           
 int getMax_mem_check_delay()
           
 long getMax_move_delay()
           
 long getMax_player_mem()
           
 int getMax_thinking_ms()
           
 int getMemkill()
           
 int getMin_cycle_ms()
           
 long getMin_move_delay()
           
 int getPlayer_controlling()
           
 int getPrint_calc_ms()
           
 int getPrint_player_mem()
           
 int getRecord()
           
 java.lang.String getRecordName()
           
 int getReplay_reverse()
           
 int getReplay_sneay_version()
           
 int getReplay_stepwidth()
           
 int getReplay_stepwise()
           
 int getReplay()
           
 java.lang.String getReplayName()
           
 int getShow_subcycles()
           
 long getSuddend_time()
           
 int getSurvival_points()
           
 int getTimekill()
           
 int getTolerance_ms()
           
protected  void setAnalyse_ms(int analyse_ms)
           
protected  void setAuto_grow_delay(int auto_grow_delay)
           
protected  void setAuto_slowdown_delay(int auto_slowdown_delay)
           
protected  void setAutogamespeed(int autogamespeed)
           
protected  void setDamage_length_grow(float damage_length_grow)
           
protected  void setDamage_points_radius(int damage_points_radius)
           
protected  void setEasy_points(int easy_points)
           
protected  void setExit_time(long exit_time)
           
protected  void setGame_end(int game_end)
           
protected  void setGameTime(long gameTime)
           
protected  void setGoody_length_occ(int goody_length_occ)
           
protected  void setGoody_length_value(int goody_length_value)
           
protected  void setGoody_points_occ(int goody_points_occ)
           
protected  void setGoody_points_value(int goody_points_value)
           
protected  void setGoody_shorter_occ(int goody_shorter_occ)
           
protected  void setGoody_shorter_value(int goody_shorter_value)
           
protected  void setGoody_slowdown_occ(int goody_slowdown_occ)
           
protected  void setGoody_speed_occ(int goody_speed_occ)
           
protected  void setInit_length(int init_length)
           
protected  void setInit_move_delay(long init_move_delay)
           
protected  void setKill_point_goodies(int kill_point_goodies)
           
protected  void setKill_points_radius(int kill_points_radius)
           
protected  void setLogging(int logging)
           
protected  void setMax_goody_occ_delay(int max_goody_occ_delay)
           
protected  void setMax_mem_check_delay(int max_mem_check_delay)
           
protected  void setMax_move_delay(long max_move_delay)
           
protected  void setMax_player_mem(long max_player_mem)
           
protected  void setMax_thinking_ms(int max_thinking_ms)
           
protected  void setMemkill(int memkill)
           
protected  void setMin_cycle_ms(int min_cycle_ms)
           
protected  void setMin_move_delay(long min_move_delay)
           
protected  void setPlayer_controlling(int no_player_controlling)
           
protected  void setPrint_calc_ms(int print_calc_ms)
           
protected  void setPrint_player_mem(int print_player_mem)
           
protected  void setRecord(int record)
           
protected  void setRecordName(java.lang.String recordName)
           
protected  void setReplay_reverse(int replay_reverse)
           
protected  void setReplay_sneay_version(int replay_sneay_version)
           
protected  void setReplay_stepwidth(int replay_stepwidth)
           
protected  void setReplay_stepwise(int replay_stepwise)
           
protected  void setReplay(int replay)
           
protected  void setReplayName(java.lang.String replayName)
           
protected  void setShow_subcycles(int show_subcycles)
           
protected  void setSuddend_time(long suddend_time)
           
protected  void setSurvival_points(int survival_points)
           
protected  void setTimekill(int timekill)
           
protected  void setTolerance_ms(int tolerance_ms)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gameTime

private long gameTime
the internal counter of the game cycles


damage_points_radius

private int damage_points_radius
The Distance in which snakes gain points if an other snake looses a segment. The number of points is damage_points_radius - (dist = deltaRow + deltaLine)


kill_points_radius

private int kill_points_radius
The Distance in which snakes gain points if an other snake dies. The number of points is kill_points_radius - (dist = deltaRow + deltaLine)


kill_point_goodies

private int kill_point_goodies
The number of goodies which spread out when a snake dies. The Radius where they occure is the same as kill_points_radius


easy_points

private int easy_points
if a snake bites it self, this number of points are given all snakes, that touches the biting snake at at least one segments. that meens the bodys touches each other.


damage_length_grow

private float damage_length_grow
The amount of segments (part of a segment) that a snake grows if an other snake runns into it.


min_move_delay

private long min_move_delay
The minimum delay for snakes to move


init_move_delay

private long init_move_delay
The initial delay for snakes to move


max_move_delay

private long max_move_delay
The maximum delay for snakes to move


init_length

private int init_length
the initial length of the snakes


auto_grow_delay

private int auto_grow_delay
each auto_grow_delay number of world cycles, the snake grows by one segment


auto_slowdown_delay

private int auto_slowdown_delay
each auto_slowdown_delay number of world cycles, the snakes waitCycles increase by one. If the snake eats a speed up or a slw down goodie, the time starts new.


max_goody_occ_delay

private int max_goody_occ_delay
the maximal time between two goody occurances. The time is equal distributed.


goody_speed_occ

private int goody_speed_occ
estimation that a new goody is a speed goody. propability: goody_speed_occ/Sum(goody_..._occ)


goody_slowdown_occ

private int goody_slowdown_occ
estimation that a new goody is a slowdown goody. propability: goody_slowdown_occ/Sum(goody_..._occ)


goody_length_occ

private int goody_length_occ
estimation that a new goody is a length goody. propability: goody_length_occ/Sum(goody_..._occ)


goody_points_occ

private int goody_points_occ
estimation that a new goody is a points goody. propability: goody_points_occ/Sum(goody_..._occ)


goody_shorter_occ

private int goody_shorter_occ
estimation that a new goody is a shorter goody. propability: goody_points_occ/Sum(goody_..._occ)


goody_length_value

private int goody_length_value
the number of segments a snake gets longer, if it eats a length goody


goody_points_value

private int goody_points_value
the number of points a snake gets, if it eats a points goody


goody_shorter_value

private int goody_shorter_value
the number of segments a snake looses, if it eats a shorter goody


min_cycle_ms

private int min_cycle_ms
the minimum time in milliseconds one game cycle should take. if the game is faster than this time, its waited until this


max_thinking_ms

private int max_thinking_ms
the maximal number of millisecondas a player should think


tolerance_ms

private int tolerance_ms
after this milliseconds, the player is kicked if he still thinks


analyse_ms

private int analyse_ms
at the beginning of the game (gameTime == 0), the player gets additinal time to analyse the board


max_player_mem

private long max_player_mem
maximal memory a player can allocate. if he needs more, he will be kicked.


max_mem_check_delay

private int max_mem_check_delay
the maximal delay of game cycles until the next players size is controlled


exit_time

private long exit_time
the game cycle the exit opens


suddend_time

private long suddend_time
the game cycle the sudden death starts


survival_points

private int survival_points
the number of points a player gets if he reaches the exit. the later a player goes into the exit, the more points are made.


show_subcycles

private int show_subcycles
if the graphical interface should actuialize the screan after each calculation of the game board


logging

private int logging
should the game be logged?


print_calc_ms

private int print_calc_ms
if 1 the time a player needed is printed into the console


print_player_mem

private int print_player_mem
if 1 the memory usage a player needed is printed into the console


player_controlling

private int player_controlling
if 0, the calculation will not be inside a thread Time and memory control will be disabled.


record

private int record
if 0 no record, if 1 record


replay

private int replay
if 0 no replay, if 1 replay, if 2 its replay initialisation mode for spetial behaviour of some commands


replay_reverse

private int replay_reverse
reverses the replay, so its running backwards


replay_stepwise

private int replay_stepwise
eiter the replay should be showed stepwise or not


replay_stepwidth

private int replay_stepwidth
the stepwidth of replays


replay_sneay_version

private int replay_sneay_version
the version of nseady with witch the replay was recorded


timekill

private int timekill
if the player should be killed if he needs longer than he should


memkill

private int memkill
if the player should be killed if he needs more mem than he should


autogamespeed

private int autogamespeed
whether the game speed should fit to human behavier or not.


game_end

private int game_end
0: game pauses at the end 1: game stops at the end 2: game quits at the end


recordName

private java.lang.String recordName
the name of the record..


replayName

private java.lang.String replayName
the name of the replay

Constructor Detail

GameParameter

public GameParameter()
Method Detail

getAnalyse_ms

public int getAnalyse_ms()
Returns:
Returns the analyse_ms.

getAuto_grow_delay

public int getAuto_grow_delay()
Returns:
Returns the auto_grow_delay.

getAuto_slowdown_delay

public int getAuto_slowdown_delay()
Returns:
Returns the auto_slowdown_delay.

getDamage_length_grow

public float getDamage_length_grow()
Returns:
Returns the damage_length_grow.

getDamage_points_radius

public int getDamage_points_radius()
Returns:
Returns the damage_points_radius.

getExit_time

public long getExit_time()
Returns:
Returns the exit_time.

getGameTime

public long getGameTime()
Returns:
Returns the gameTime.

getGoody_length_occ

public int getGoody_length_occ()
Returns:
Returns the goody_length_occ.

getGoody_length_value

public int getGoody_length_value()
Returns:
Returns the goody_length_value.

getGoody_points_occ

public int getGoody_points_occ()
Returns:
Returns the goody_points_occ.

getGoody_points_value

public int getGoody_points_value()
Returns:
Returns the goody_points_value.

getGoody_slowdown_occ

public int getGoody_slowdown_occ()
Returns:
Returns the goody_slowdown_occ.

getGoody_speed_occ

public int getGoody_speed_occ()
Returns:
Returns the goody_speed_occ.

getGoody_shorter_occ

public int getGoody_shorter_occ()
Returns:
Returns the goody_shorter_occ.

getGoody_shorter_value

public int getGoody_shorter_value()
Returns:
Returns the goody_shorter_value.

getInit_length

public int getInit_length()
Returns:
Returns the init_length.

getInit_move_delay

public long getInit_move_delay()
Returns:
Returns the init_move_delay.

getKill_point_goodies

public int getKill_point_goodies()
Returns:
Returns the kill_point_goodies.

getKill_points_radius

public int getKill_points_radius()
Returns:
Returns the kill_points_radius.

getLogging

public int getLogging()
Returns:
Returns the logging.

getMax_goody_occ_delay

public int getMax_goody_occ_delay()
Returns:
Returns the max_goody_occ_delay.

getMax_mem_check_delay

public int getMax_mem_check_delay()
Returns:
Returns the max_mem_check_delay.

getMax_move_delay

public long getMax_move_delay()
Returns:
Returns the max_move_delay.

getMax_player_mem

public long getMax_player_mem()
Returns:
Returns the max_player_mem.

getMin_move_delay

public long getMin_move_delay()
Returns:
Returns the min_move_delay.

getPrint_calc_ms

public int getPrint_calc_ms()
Returns:
Returns the print_calc_ms.

getPrint_player_mem

public int getPrint_player_mem()
Returns:
Returns the print_player_mem.

getShow_subcycles

public int getShow_subcycles()
Returns:
Returns the show_subcycles.

getSuddend_time

public long getSuddend_time()
Returns:
Returns the suddend_time.

getSurvival_points

public int getSurvival_points()
Returns:
Returns the survival_points.

getMin_cycle_ms

public int getMin_cycle_ms()
Returns:
Returns the min_cycle_ms.

getMax_thinking_ms

public int getMax_thinking_ms()
Returns:
Returns the max_thinking_ms.

getTolerance_ms

public int getTolerance_ms()
Returns:
Returns the tolerance_ms.

getEasy_points

public int getEasy_points()
Returns:
Returns the get_easy_points.

getPlayer_controlling

public int getPlayer_controlling()
Returns:
Returns the no_player_controlling.

getRecord

public int getRecord()
Returns:
Returns the record.

getReplay

public int getReplay()
Returns:
Returns the replay.

getReplay_reverse

public int getReplay_reverse()
Returns:
Returns the replay_reverse.

getReplay_stepwise

public int getReplay_stepwise()
Returns:
Returns the replay_stepwise.

getReplay_stepwidth

public int getReplay_stepwidth()
Returns:
Returns the replay_stepwidth.

getReplay_sneay_version

public int getReplay_sneay_version()
Returns:
Returns the replay_sneay_version.

getMemkill

public int getMemkill()
Returns:
Returns the memkill.

getTimekill

public int getTimekill()
Returns:
Returns the timekill.

getAutogamespeed

public int getAutogamespeed()
Returns:
Returns the autoHumanSpeed.

getGame_end

public int getGame_end()
Returns:
Returns the game_end.

getRecordName

public java.lang.String getRecordName()
Returns:
Returns the recordName.

getReplayName

public java.lang.String getReplayName()
Returns:
Returns the replayName.

setAnalyse_ms

protected void setAnalyse_ms(int analyse_ms)
Parameters:
analyse_ms - The analyse_ms to set.

setAuto_grow_delay

protected void setAuto_grow_delay(int auto_grow_delay)
Parameters:
auto_grow_delay - The auto_grow_delay to set.

setAuto_slowdown_delay

protected void setAuto_slowdown_delay(int auto_slowdown_delay)
Parameters:
auto_slowdown_delay - The auto_slowdown_delay to set.

setDamage_length_grow

protected void setDamage_length_grow(float damage_length_grow)
Parameters:
damage_length_grow - The damage_length_grow to set.

setDamage_points_radius

protected void setDamage_points_radius(int damage_points_radius)
Parameters:
damage_points_radius - The damage_points_radius to set.

setExit_time

protected void setExit_time(long exit_time)
Parameters:
exit_time - The exit_time to set.

setGameTime

protected void setGameTime(long gameTime)
Parameters:
gameTime - The gameTime to set.

setGoody_length_occ

protected void setGoody_length_occ(int goody_length_occ)
Parameters:
goody_length_occ - The goody_length_occ to set.

setGoody_length_value

protected void setGoody_length_value(int goody_length_value)
Parameters:
goody_length_value - The goody_length_value to set.

setGoody_points_occ

protected void setGoody_points_occ(int goody_points_occ)
Parameters:
goody_points_occ - The goody_points_occ to set.

setGoody_points_value

protected void setGoody_points_value(int goody_points_value)
Parameters:
goody_points_value - The goody_points_value to set.

setGoody_shorter_occ

protected void setGoody_shorter_occ(int goody_shorter_occ)
Parameters:
goody_shorter_occ - The goody_shorter_occ to set.

setGoody_shorter_value

protected void setGoody_shorter_value(int goody_shorter_value)
Parameters:
goody_shorter_value - The goody_shorter_value to set.

setGoody_slowdown_occ

protected void setGoody_slowdown_occ(int goody_slowdown_occ)
Parameters:
goody_slowdown_occ - The goody_slowdown_occ to set.

setGoody_speed_occ

protected void setGoody_speed_occ(int goody_speed_occ)
Parameters:
goody_speed_occ - The goody_speed_occ to set.

setInit_length

protected void setInit_length(int init_length)
Parameters:
init_length - The init_length to set.

setInit_move_delay

protected void setInit_move_delay(long init_move_delay)
Parameters:
init_move_delay - The init_move_delay to set.

setKill_point_goodies

protected void setKill_point_goodies(int kill_point_goodies)
Parameters:
kill_point_goodies - The kill_point_goodies to set.

setKill_points_radius

protected void setKill_points_radius(int kill_points_radius)
Parameters:
kill_points_radius - The kill_points_radius to set.

setLogging

protected void setLogging(int logging)
Parameters:
logging - The logging to set.

setMax_goody_occ_delay

protected void setMax_goody_occ_delay(int max_goody_occ_delay)
Parameters:
max_goody_occ_delay - The max_goody_occ_delay to set.

setMax_mem_check_delay

protected void setMax_mem_check_delay(int max_mem_check_delay)
Parameters:
max_mem_check_delay - The max_mem_check_delay to set.

setMax_move_delay

protected void setMax_move_delay(long max_move_delay)
Parameters:
max_move_delay - The max_move_delay to set.

setMax_player_mem

protected void setMax_player_mem(long max_player_mem)
Parameters:
max_player_mem - The max_player_mem to set.

setMin_move_delay

protected void setMin_move_delay(long min_move_delay)
Parameters:
min_move_delay - The min_move_delay to set.

setPrint_calc_ms

protected void setPrint_calc_ms(int print_calc_ms)
Parameters:
print_calc_ms - The print_calc_ms to set.

setPrint_player_mem

protected void setPrint_player_mem(int print_player_mem)
Parameters:
print_player_mem - The print_player_mem to set.

setShow_subcycles

protected void setShow_subcycles(int show_subcycles)
Parameters:
show_subcycles - The show_subcycles to set.

setSuddend_time

protected void setSuddend_time(long suddend_time)
Parameters:
suddend_time - The suddend_time to set.

setSurvival_points

protected void setSurvival_points(int survival_points)
Parameters:
survival_points - The survival_points to set.

setMin_cycle_ms

protected void setMin_cycle_ms(int min_cycle_ms)
Parameters:
min_cycle_ms - The min_cycle_ms to set.

setMax_thinking_ms

protected void setMax_thinking_ms(int max_thinking_ms)
Parameters:
max_thinking_ms - The max_thinking_ms to set.

setTolerance_ms

protected void setTolerance_ms(int tolerance_ms)
Parameters:
tolerance_ms - The tolerance_ms to set.

setEasy_points

protected void setEasy_points(int easy_points)
Parameters:
easy_points - The easy_points to set.

setPlayer_controlling

protected void setPlayer_controlling(int no_player_controlling)
Parameters:
no_player_controlling - The no_player_controlling to set.

setRecord

protected void setRecord(int record)
Parameters:
record - The record to set.

setReplay

protected void setReplay(int replay)
Parameters:
replay - The replay to set.

setReplay_stepwise

protected void setReplay_stepwise(int replay_stepwise)
Parameters:
replay_stepwise - The replay_stepwise to set.

setReplay_sneay_version

protected void setReplay_sneay_version(int replay_sneay_version)
Parameters:
replay_sneay_version - The replay_sneay_version to set.

setReplay_reverse

protected void setReplay_reverse(int replay_reverse)
Parameters:
replay_reverse - The replay_reverse to set.

setReplay_stepwidth

protected void setReplay_stepwidth(int replay_stepwidth)
Parameters:
replay_stepwidth - The replay_stepwidth to set.

setMemkill

protected void setMemkill(int memkill)
Parameters:
memkill - The memkill to set.

setTimekill

protected void setTimekill(int timekill)
Parameters:
timekill - The timekill to set.

setAutogamespeed

protected void setAutogamespeed(int autogamespeed)
Parameters:
autogamespeed - The autoHumanSpeed to set.

setGame_end

protected void setGame_end(int game_end)
Parameters:
game_end - The quit_at_gameEnd to set.

setRecordName

protected void setRecordName(java.lang.String recordName)
Parameters:
recordName - The recordName to set.

setReplayName

protected void setReplayName(java.lang.String replayName)
Parameters:
replayName - The replayName to set.

copyOnMe

public void copyOnMe(GameParameter param)
Parameters:
param -

clone

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

toString

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