/*
 * Created on 26.11.2004
 *
 */
package de.farafin.snEADy.communication;

import de.farafin.snEADy.world.C_GameObject;

/**
 * A set of all common constants used in the game
 * 
 * @author roland, lars 
 * 
 * @version $Revision: 1.24 $
 */
public interface I_Constants
{ 

	// prgram constats
	/** shell the project print debug-messeges? */
	public static final boolean DEBUG = false;

	// commands
	public static final String loadplayer  = "loadplayer ";
	public static final String loadhuman  = "loadhuman ";
	public static final String delplayer = "delplayer ";
	public static final String loadlevel  = "loadlevel ";
	public static final String run = "run ";
	public static final String start = "start ";
	public static final String stop = "stop ";
	public static final String pause = "pause ";
	public static final String quit = "quit ";
	public static final String kill = "kill ";
	public static final String emergencyPause = "emergencyPause ";
	public static final String overalldelay = "overalldelay ";
	public static final String print_playfield = "print_playfield ";
	public static final String print_parameter = "print_parameter ";
	/* ! */public static final String openmonitor = "openmonitor ";
	/* ! */public static final String closemonitor = "closemonitor ";
	
	// constants
	public static final String damage_points_radius = "damage_points_radius ";
	public static final String kill_points_radius = "kill_points_radius ";
	public static final String kill_point_goodies = "kill_point_goodies ";
	/* ! */public static final String easy_points = "easy_points ";
	public static final String damage_length_grow = "damage_length_grow ";
	
	public static final String min_move_delay = "min_move_delay ";
	public static final String init_move_delay = "init_move_delay ";
	public static final String max_move_delay = "max_move_delay ";
	
	public static final String init_length = "init_length ";
	public static final String auto_grow_delay = "auto_grow_delay ";
	public static final String auto_slowdown_delay = "auto_slowdown_delay ";
	public static final String max_goody_occ_delay = "max_goody_occ_delay ";
	
	public static final String goody_speed_occ = "goody_speed_occ ";
	public static final String goody_slowdown_occ = "goody_slowdown_occ ";
	public static final String goody_length_occ = "goody_length_occ ";
	public static final String goody_points_occ = "goody_points_occ ";
	/* ! */public static final String goody_shorter_occ = "goody_shorter_occ ";
	
	public static final String goody_length_value = "goody_length_value ";
	public static final String goody_points_value = "goody_points_value ";
	/* ! */public static final String goody_shorter_value = "goody_shorter_value ";
	
	/* ! */public static final String min_cycle_ms = "min_cycle_ms ";
	/* ! */public static final String timeout_ms = "timeout_ms ";
	/* ! */public static final String max_thinking_ms = "max_thinking_ms ";
	public static final String analyse_ms = "analyse_ms ";
	
	public static final String max_player_mem = "max_player_mem ";
	public static final String max_mem_check_delay = "max_mem_check_delay ";
	
	public static final String exit_time = "exit_time ";
	public static final String suddend_time = "suddend_time ";
	
	public static final String survival_points = "survival_points ";
	public static final String show_subcycles = "show_subcycles ";
	
	public static final String logging = "logging ";
	
	public static final String print_calc_ms = "print_calc_ms ";
	public static final String print_player_mem = "print_player_mem ";
	
	/** an array of all constants */
	public static final String[] commandConstants =
		{
			loadplayer,
			loadhuman,
			delplayer,
			loadlevel,
			run,
			start,
			stop,
			pause,
			quit,
			kill,
			emergencyPause,
			overalldelay,
			print_playfield,
			print_parameter,
			openmonitor,
			closemonitor,
			
			// constants
			damage_points_radius,
			kill_points_radius,
			kill_point_goodies,
			easy_points,
			damage_length_grow,
			
			min_move_delay,
			init_move_delay,
			max_move_delay,
			
			init_length,
			auto_grow_delay,
			auto_slowdown_delay,
			max_goody_occ_delay,
			
			goody_speed_occ,
			goody_slowdown_occ,
			goody_length_occ,
			goody_points_occ,
			goody_shorter_occ,
			
			goody_length_value,
			goody_points_value,
			goody_shorter_value,
			
			min_cycle_ms,
			timeout_ms,
			max_thinking_ms,
			analyse_ms,
			
			max_player_mem,
			max_mem_check_delay,
			
			exit_time,
			suddend_time,
			
			survival_points,
			show_subcycles,
			
			logging,
			
			print_calc_ms,
			print_player_mem
		};
	// snake Constants
	// move directions
	/** the snake moves stright ahead */
	public static final int TURN_NONE = 0;
	
	/** the snake turns left */
	public static final int TURN_LEFT = -1;

	/** the snake turns right */
	public static final int TURN_RIGHT = 1;
	

	// watch directions
	/** face direction of an GameObject
	 * @see C_GameObject */
	public static final int FACE_NORTH 	= 0;

	/** face direction of an GameObject
	 * @see C_GameObject */
	public static final int FACE_EAST 	= 1;

	/** face direction of an GameObject
	 * @see C_GameObject */
	public static final int FACE_SOUTH 	= 2;

	/** face direction of an GameObject
	 * @see C_GameObject */
	public static final int FACE_WEST 	= 3;

	// snake Status
	/** if a snake is on the field and running */
	public static final int IN_ACTION = 0;
	
	/** if the snake died in battle, rest in peace */
	public static final int IN_HEAVEN = 1;
	
	/** if the snake has left the house throu the exit */
	public static final int IN_EXIT = 2;
	
	/** if the player was gaining to much RAM-space */
	public static final int IN_ERROR_SPACE = 3;

	/** if the player needed to much calculationtime */
	public static final int IN_ERROR_TIME = 4;

	/** if the player wasnt able to initialize */
	public static final int IN_ERROR_INIT = 5;
	
	/** if the player threw a exception */
	public static final int IN_ERROR_EXC = 6;
	
	
	/** the maximal number of players the program can handle */
	public static final int MAX_PLAYERS = 10;
	
	/** the maximal number of human players the program can handle */
	public static final int MAX_HUMAN_PLAYERS = 4;
	
}