/*
 * Created on 19-Jan-2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package de.farafin.snEADy;
/**
 * @author roland, lars
 *
 */
public final class GameParameter
{
	/** the internal counter of the game cycles */
	private long gameTime = 0;

	/** 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)
	 */
	private int damage_points_radius = 1;

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

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

	/** 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.
	 *  */
	private int easy_points = 0;

	/** The amount of segments (part of a segment) that a snake grows if
	 * an other snake runns into it. */
	private float damage_length_grow = 0.0f;

	/** The minimum delay for snakes to move */
	private  long min_move_delay = 2;

	/** The initial delay for snakes to move */
	private long init_move_delay = 4;

	/** The maximum delay for snakes to move */
	private long max_move_delay = 6;

	/** the initial length of the snakes*/
	private int init_length = 20;

	/** each auto_grow_delay number of world cycles, the snake grows by one segment */
	private int auto_grow_delay = 100;

	/** 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.  */
	private int auto_slowdown_delay = 1000;

	/** the maximal time between two goody occurances. The time is equal distributed. */
	private int max_goody_occ_delay = 200;

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

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

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

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

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

	/** the number of segments a snake gets longer, if it eats a length goody */
	private int goody_length_value = 20;

	/** the number of points a snake gets, if it eats a points goody */
	private int goody_points_value = 10;

	/** the number of segments a snake looses, if it eats a shorter goody */
	private int goody_shorter_value = 10;

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

	/** the maximal number of millisecondas a player should think */
	private int max_thinking_ms = 20;

	/** after this milliseconds, the player is kicked if he still thinks */
	private int timeout_ms = 100;

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

	/** maximal memory a player can allocate. if he needs more, he will be kicked. */
	private long max_player_mem = 8192;

	/** the maximal delay of game cycles until the next players size is controlled */
	private int max_mem_check_delay = 10;

	/** the game cycle the exit opens */
	private long exit_time = 5000;

	/** the game cycle the sudden death starts */
	private long suddend_time = 7000;

	/** 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. */
	private int survival_points = 50;

	/** if the graphical interface should actuialize the screan after each
	 * calculation of the game board */
	private int show_subcycles = 0;

	/** should the game be logged? */
	private int logging = 1;

	/** if 1 the time a player needed is printed into the console */
	private int print_calc_ms = 0;

	/** if 1 the memory usage a player needed is printed into the console */
	private int print_player_mem = 0;

	/** make the gamecalculation in the gameThread. no controll of anything, no waiting time,
	 * the full power that is possible will go into the game. */
	private int no_thread_calc = 0;


	/**
	 * @return Returns the analyse_ms.
	 */
	public int getAnalyse_ms()
	{
		return analyse_ms;
	}
	/**
	 * @return Returns the auto_grow_delay.
	 */
	public int getAuto_grow_delay()
	{
		return auto_grow_delay;
	}
	/**
	 * @return Returns the auto_slowdown_delay.
	 */
	public int getAuto_slowdown_delay()
	{
		return auto_slowdown_delay;
	}
	/**
	 * @return Returns the damage_length_grow.
	 */
	public float getDamage_length_grow()
	{
		return damage_length_grow;
	}
	/**
	 * @return Returns the damage_points_radius.
	 */
	public int getDamage_points_radius()
	{
		return damage_points_radius;
	}
	/**
	 * @return Returns the exit_time.
	 */
	public long getExit_time()
	{
		return exit_time;
	}
	/**
	 * @return Returns the gameTime.
	 */
	public long getGameTime()
	{
		return gameTime;
	}
	/**
	 * @return Returns the goody_length_occ.
	 */
	public int getGoody_length_occ()
	{
		return goody_length_occ;
	}
	/**
	 * @return Returns the goody_length_value.
	 */
	public int getGoody_length_value()
	{
		return goody_length_value;
	}
	/**
	 * @return Returns the goody_points_occ.
	 */
	public int getGoody_points_occ()
	{
		return goody_points_occ;
	}
	/**
	 * @return Returns the goody_points_value.
	 */
	public int getGoody_points_value()
	{
		return goody_points_value;
	}
	/**
	 * @return Returns the goody_slowdown_occ.
	 */
	public int getGoody_slowdown_occ()
	{
		return goody_slowdown_occ;
	}
	/**
	 * @return Returns the goody_speed_occ.
	 */
	public int getGoody_speed_occ()
	{
		return goody_speed_occ;
	}
	/**
	 * @return Returns the goody_shorter_occ.
	 */
	public int getGoody_shorter_occ()
	{
		return goody_shorter_occ;
	}
	/**
	 * @return Returns the goody_shorter_value.
	 */
	public int getGoody_shorter_value()
	{
		return goody_shorter_value;
	}
	/**
	 * @return Returns the init_length.
	 */
	public int getInit_length()
	{
		return init_length;
	}
	/**
	 * @return Returns the init_move_delay.
	 */
	public long getInit_move_delay()
	{
		return init_move_delay;
	}
	/**
	 * @return Returns the kill_point_goodies.
	 */
	public int getKill_point_goodies()
	{
		return kill_point_goodies;
	}
	/**
	 * @return Returns the kill_points_radius.
	 */
	public int getKill_points_radius()
	{
		return kill_points_radius;
	}
	/**
	 * @return Returns the logging.
	 */
	public int getLogging()
	{
		return logging;
	}
	/**
	 * @return Returns the max_goody_occ_delay.
	 */
	public int getMax_goody_occ_delay()
	{
		return max_goody_occ_delay;
	}
	/**
	 * @return Returns the max_mem_check_delay.
	 */
	public int getMax_mem_check_delay()
	{
		return max_mem_check_delay;
	}
	/**
	 * @return Returns the max_move_delay.
	 */
	public long getMax_move_delay()
	{
		return max_move_delay;
	}
	/**
	 * @return Returns the max_player_mem.
	 */
	public long getMax_player_mem()
	{
		return max_player_mem;
	}
	/**
	 * @return Returns the min_move_delay.
	 */
	public long getMin_move_delay()
	{
		return min_move_delay;
	}
	/**
	 * @return Returns the print_calc_ms.
	 */
	public int getPrint_calc_ms()
	{
		return print_calc_ms;
	}
	/**
	 * @return Returns the print_player_mem.
	 */
	public int getPrint_player_mem()
	{
		return print_player_mem;
	}
	/**
	 * @return Returns the show_subcycles.
	 */
	public int getShow_subcycles()
	{
		return show_subcycles;
	}
	/**
	 * @return Returns the suddend_time.
	 */
	public long getSuddend_time()
	{
		return suddend_time;
	}
	/**
	 * @return Returns the survival_points.
	 */
	public int getSurvival_points()
	{
		return survival_points;
	}
	/**
	 * @return Returns the min_cycle_ms.
	 */
	public int getMin_cycle_ms()
	{
		return min_cycle_ms;
	}
	/**
	 * @return Returns the max_thinking_ms.
	 */
	public int getMax_thinking_ms()
	{
		return max_thinking_ms;
	}
	/**
	 * @return Returns the timeout_ms.
	 */
	public int getTimeout_ms()
	{
		return timeout_ms;
	}

	/**
	 * @return Returns the get_easy_points.
	 */
	public int getEasy_points()
	{
		return easy_points;
	}

	/**
	 * @return Returns the no_thread_calc.
	 */
	public int getNo_thread_calc()
	{
		return no_thread_calc;
	}
	/**
	 * @param analyse_ms The analyse_ms to set.
	 */
	protected void setAnalyse_ms(int analyse_ms)
	{
		this.analyse_ms = analyse_ms;
	}
	/**
	 * @param auto_grow_delay The auto_grow_delay to set.
	 */
	protected void setAuto_grow_delay(int auto_grow_delay)
	{
		this.auto_grow_delay = auto_grow_delay;
	}
	/**
	 * @param auto_slowdown_delay The auto_slowdown_delay to set.
	 */
	protected void setAuto_slowdown_delay(int auto_slowdown_delay)
	{
		this.auto_slowdown_delay = auto_slowdown_delay;
	}
	/**
	 * @param damage_length_grow The damage_length_grow to set.
	 */
	protected void setDamage_length_grow(float damage_length_grow)
	{
		this.damage_length_grow = damage_length_grow;
	}
	/**
	 * @param damage_points_radius The damage_points_radius to set.
	 */
	protected void setDamage_points_radius(int damage_points_radius)
	{
		this.damage_points_radius = damage_points_radius;
	}
	/**
	 * @param exit_time The exit_time to set.
	 */
	protected void setExit_time(long exit_time)
	{
		this.exit_time = exit_time;
	}
	/**
	 * @param gameTime The gameTime to set.
	 */
	protected void setGameTime(long gameTime)
	{
		this.gameTime = gameTime;
	}
	/**
	 * @param goody_length_occ The goody_length_occ to set.
	 */
	protected void setGoody_length_occ(int goody_length_occ)
	{
		this.goody_length_occ = goody_length_occ;
	}
	/**
	 * @param goody_length_value The goody_length_value to set.
	 */
	protected void setGoody_length_value(int goody_length_value)
	{
		this.goody_length_value = goody_length_value;
	}
	/**
	 * @param goody_points_occ The goody_points_occ to set.
	 */
	protected void setGoody_points_occ(int goody_points_occ)
	{
		this.goody_points_occ = goody_points_occ;
	}
	/**
	 * @param goody_points_value The goody_points_value to set.
	 */
	protected void setGoody_points_value(int goody_points_value)
	{
		this.goody_points_value = goody_points_value;
	}
	/**
	 * @param goody_shorter_occ The goody_shorter_occ to set.
	 */
	protected void setGoody_shorter_occ(int goody_shorter_occ)
	{
		this.goody_shorter_occ = goody_shorter_occ;
	}
	/**
	 * @param goody_shorter_value The goody_shorter_value to set.
	 */
	protected void setGoody_shorter_value(int goody_shorter_value)
	{
		this.goody_shorter_value = goody_shorter_value;
	}
	/**
	 * @param goody_slowdown_occ The goody_slowdown_occ to set.
	 */
	protected void setGoody_slowdown_occ(int goody_slowdown_occ)
	{
		this.goody_slowdown_occ = goody_slowdown_occ;
	}
	/**
	 * @param goody_speed_occ The goody_speed_occ to set.
	 */
	protected void setGoody_speed_occ(int goody_speed_occ)
	{
		this.goody_speed_occ = goody_speed_occ;
	}
	/**
	 * @param init_length The init_length to set.
	 */
	protected void setInit_length(int init_length)
	{
		this.init_length = init_length;
	}
	/**
	 * @param init_move_delay The init_move_delay to set.
	 */
	protected void setInit_move_delay(long init_move_delay)
	{
		this.init_move_delay = init_move_delay;
	}
	/**
	 * @param kill_point_goodies The kill_point_goodies to set.
	 */
	protected void setKill_point_goodies(int kill_point_goodies)
	{
		this.kill_point_goodies = kill_point_goodies;
	}
	/**
	 * @param kill_points_radius The kill_points_radius to set.
	 */
	protected void setKill_points_radius(int kill_points_radius)
	{
		this.kill_points_radius = kill_points_radius;
	}
	/**
	 * @param logging The logging to set.
	 */
	protected void setLogging(int logging)
	{
		this.logging = logging;
	}
	/**
	 * @param max_goody_occ_delay The max_goody_occ_delay to set.
	 */
	protected void setMax_goody_occ_delay(int max_goody_occ_delay)
	{
		this.max_goody_occ_delay = max_goody_occ_delay;
	}
	/**
	 * @param max_mem_check_delay The max_mem_check_delay to set.
	 */
	protected void setMax_mem_check_delay(int max_mem_check_delay)
	{
		this.max_mem_check_delay = max_mem_check_delay;
	}
	/**
	 * @param max_move_delay The max_move_delay to set.
	 */
	protected void setMax_move_delay(long max_move_delay)
	{
		this.max_move_delay = max_move_delay;
	}
	/**
	 * @param max_player_mem The max_player_mem to set.
	 */
	protected void setMax_player_mem(long max_player_mem)
	{
		this.max_player_mem = max_player_mem;
	}
	/**
	 * @param min_move_delay The min_move_delay to set.
	 */
	protected void setMin_move_delay(long min_move_delay)
	{
		this.min_move_delay = min_move_delay;
	}
	/**
	 * @param print_calc_ms The print_calc_ms to set.
	 */
	protected void setPrint_calc_ms(int print_calc_ms)
	{
		this.print_calc_ms = print_calc_ms;
	}
	/**
	 * @param print_player_mem The print_player_mem to set.
	 */
	protected void setPrint_player_mem(int print_player_mem)
	{
		this.print_player_mem = print_player_mem;
	}
	/**
	 * @param show_subcycles The show_subcycles to set.
	 */
	protected void setShow_subcycles(int show_subcycles)
	{
		this.show_subcycles = show_subcycles;
	}
	/**
	 * @param suddend_time The suddend_time to set.
	 */
	protected void setSuddend_time(long suddend_time)
	{
		this.suddend_time = suddend_time;
	}
	/**
	 * @param survival_points The survival_points to set.
	 */
	protected void setSurvival_points(int survival_points)
	{
		this.survival_points = survival_points;
	}
	/**
	 * @param min_cycle_ms The min_cycle_ms to set.
	 */
	protected void setMin_cycle_ms(int min_cycle_ms)
	{
		this.min_cycle_ms = min_cycle_ms;
	}
	/**
	 * @param max_thinking_ms The max_thinking_ms to set.
	 */
	protected void setMax_thinking_ms(int max_thinking_ms)
	{
		this.max_thinking_ms = max_thinking_ms;
	}
	/**
	 * @param timeout_ms The timeout_ms to set.
	 */
	protected void setTimeout_ms(int timeout_ms)
	{
		this.timeout_ms = timeout_ms;
	}

	/**
	 * @param easy_points The easy_points to set.
	 */
	protected void setEasy_points(int easy_points)
	{
		this.easy_points = easy_points;
	}

	/**
	 * @param no_thread_calc The no_thread_calc to set.
	 */
	protected void setNo_thread_calc(int bruteForceCalc)
	{
		this.no_thread_calc = bruteForceCalc;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString()
	{
		String s = "game parameter: \n";
		s += "gameTime " + this.gameTime + "\n";
		s += "damage_points_radius " + this.damage_points_radius + "\n";
		s += "kill_points_radius " + this.kill_points_radius + "\n";
		s += "kill_point_goodies " + this.kill_point_goodies + "\n";
		s += "damage_length_grow " + this.damage_length_grow + "\n";
		s += "min_move_delay " + this.min_move_delay + "\n";
		s += "init_move_delay " + this.init_move_delay + "\n";
		s += "max_move_delay " + this.max_move_delay + "\n";
		s += "init_length " + this.init_length + "\n";
		s += "auto_grow_delay " + this.auto_grow_delay + "\n";
		s += "auto_slowdown_delay " + this.auto_slowdown_delay + "\n";
		s += "max_goody_occ_delay " + this.max_goody_occ_delay + "\n";
		s += "goody_speed_occ " + this.goody_speed_occ + "\n";
		s += "goody_slowdown_occ " + this.goody_slowdown_occ + "\n";
		s += "goody_length_occ " + this.goody_length_occ + "\n";
		s += "goody_points_occ " + this.goody_points_occ + "\n";
		s += "goody_length_value " + this.goody_length_value + "\n";
		s += "goody_points_value " + this.goody_points_value + "\n";
		s += "min_cycle_ms " + this.min_cycle_ms + "\n";
		s += "max_thinking_ms " + this.max_thinking_ms + "\n";
		s += "timeout_ms " + this.timeout_ms + "\n";
		s += "analyse_ms " + this.analyse_ms + "\n";
		s += "max_player_mem " + this.max_player_mem + "\n";
		s += "max_mem_check_delay " + this.max_mem_check_delay + "\n";
		s += "exit_time " + this.exit_time + "\n";
		s += "suddend_time " + this.suddend_time + "\n";
		s += "survival_points " + this.survival_points + "\n";
		s += "show_subcycles " + this.show_subcycles + "\n";
		s += "logging " + this.logging + "\n";
		s += "print_calc_ms " + this.print_calc_ms + "\n";
		s += "print_player_mem " + this.print_player_mem + "\n";
		s += "easy_points " + this.easy_points + "\n";
		s += "no_thread_calc " + this.no_thread_calc + "\n";
		return s;
	}
}
