src/main/java/ru/alphatech/icfpc/game/strategy/OtherStrategy.java
changeset 88 9555608af847
parent 80 fcdce54b2f25
child 90 774e7ce00b5f
equal deleted inserted replaced
87:0f4c762f56f7 88:9555608af847
       
     1 package ru.alphatech.icfpc.game.strategy;
       
     2 
       
     3 import java.io.PrintStream;
       
     4 import java.util.LinkedList;
       
     5 import java.util.List;
       
     6 import java.util.Queue;
       
     7 
       
     8 import ru.alphatech.icfpc.game.Batch;
       
     9 import ru.alphatech.icfpc.game.Player;
       
    10 
       
    11 public class OtherStrategy implements IStrategy {
       
    12 	
       
    13 	private static Queue<Batch> batches = new LinkedList<Batch>();
       
    14 	
       
    15 	public void clearBatcher(){
       
    16 		batches.removeAll(batches);
       
    17 	}
       
    18 	
       
    19 	public void addBatcher(List<Batch> batches){
       
    20 		this.batches.addAll(batches);
       
    21 	}
       
    22 	
       
    23 	@Override
       
    24 	public void moving(Player proponent, Player opponent, PrintStream out) {
       
    25 		out.print(batches.poll());
       
    26 	}
       
    27 
       
    28 }