src/main/java/ru/alphatech/icfpc/game/strategy/OtherStrategy.java
author rushan
Sun, 19 Jun 2011 17:32:48 +0400
changeset 89 b6543dcda026
parent 80 fcdce54b2f25
child 90 774e7ce00b5f
permissions -rw-r--r--
(no commit message)
     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 }