src/main/java/ru/alphatech/icfpc/game/Run.java
changeset 50 83ff9504b901
parent 48 7e49c679fc70
child 55 26d05bc45f1d
     1.1 --- a/src/main/java/ru/alphatech/icfpc/game/Run.java	Sun Jun 19 13:31:13 2011 +0400
     1.2 +++ b/src/main/java/ru/alphatech/icfpc/game/Run.java	Sun Jun 19 13:32:30 2011 +0400
     1.3 @@ -19,14 +19,35 @@
     1.4  	
     1.5  	private static Player opponent = new Player();
     1.6  	
     1.7 -	private LinkedList<Batch> batches = new LinkedList<Batch>();
     1.8 +	private static LinkedList<Batch> batches = new LinkedList<Batch>();
     1.9  	
    1.10 -	public void clearBatcher(){
    1.11 +	private static int registers[] = new int[4];
    1.12 +	
    1.13 +	static {
    1.14 +		registers[0] = 0;
    1.15 +		registers[1] = 1;
    1.16 +		registers[2] = 2;
    1.17 +		registers[3] = 3;
    1.18 +	}
    1.19 +	
    1.20 +	public static Slot getRegisterByIndex(int registerIdex){
    1.21 +		return proponent.getSlot( registers[registerIdex] );
    1.22 +	}
    1.23 +	
    1.24 +	public static void clearBatcher(){
    1.25  		batches.removeAll(batches);
    1.26  	}
    1.27  	
    1.28 -	public void addBatcher(List<Batch> batches){
    1.29 -		this.batches.addAll(this.batches);
    1.30 +	public static void addBatcher(List<Batch> batches){
    1.31 +		batches.addAll(batches);
    1.32 +	}
    1.33 +	
    1.34 +	public static Player getOpponent(){
    1.35 +		return opponent;
    1.36 +	}
    1.37 +	
    1.38 +	public static Player getProponent(){
    1.39 +		return proponent;
    1.40  	}
    1.41  	
    1.42  	private static void readOpponent() throws IOException