/*
 * Created on Dec 3, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package de.farafin.snEADy.communication;

/** This class is for communication between the Main Engine and user Interface
 * @author roland, lars
 * 
 * TODO #lars: place here the data that the control interface should be able to share with mainEngine.
 *  
 * @version $Revision: 1.2 $ 
 */
public class D_ControlInteraction{
	
	public static final int CA_LOAD_ARENA	=1,
							CA_LOAD_PLAYER	=2,
							CA_CHANGE_ARENA	=3,
							CA_CHANGE_PLAYER=4,
							CA_CHANGE_ENGINE=5,
							CA_PAUSE		=6,
							CA_RESUME		=7,
							CA_STOP			=8,
							CA_EXIT			=9,
							CA_RESTART		=10;
	
	public int id;
	
	public Object obj;
	public int ca;
	private static  String names[]= names=new String[11];
	

	private D_ControlInteraction(){
		names[CA_LOAD_ARENA]="Load arena";
		names[CA_LOAD_PLAYER]="Load player";
		names[CA_CHANGE_ARENA]="Change arena";
		names[CA_CHANGE_PLAYER]="Change player";
		names[CA_CHANGE_ENGINE]="Change Engine";
		names[CA_PAUSE]="Pause";
		names[CA_RESUME]="Resume";
		names[CA_STOP]="Stop";
		names[CA_RESTART]="Restart";
		names[CA_EXIT]="Exit";
	}
	
	public D_ControlInteraction(int controlAction,Object param){
		this();
		ca=controlAction;
		obj=param;
	}
	public String toString(){
		return "Action:" + names[ca] + obj;
	}
}
