| author | akhmetovlz |
| Sun, 19 Jun 2011 17:45:47 +0400 | |
| changeset 92 | 2e69298ad664 |
| parent 80 | fcdce54b2f25 |
| child 90 | 774e7ce00b5f |
| permissions | -rw-r--r-- |
| indvdum@80 | 1 |
package ru.alphatech.icfpc.game.strategy; |
| indvdum@80 | 2 |
|
| indvdum@80 | 3 |
import java.io.PrintStream; |
| indvdum@80 | 4 |
import java.util.LinkedList; |
| indvdum@80 | 5 |
import java.util.List; |
| indvdum@80 | 6 |
import java.util.Queue; |
| indvdum@80 | 7 |
|
| indvdum@80 | 8 |
import ru.alphatech.icfpc.game.Batch; |
| indvdum@80 | 9 |
import ru.alphatech.icfpc.game.Player; |
| indvdum@80 | 10 |
|
| indvdum@80 | 11 |
public class OtherStrategy implements IStrategy {
|
| indvdum@80 | 12 |
|
| indvdum@80 | 13 |
private static Queue<Batch> batches = new LinkedList<Batch>(); |
| indvdum@80 | 14 |
|
| indvdum@80 | 15 |
public void clearBatcher(){
|
| indvdum@80 | 16 |
batches.removeAll(batches); |
| indvdum@80 | 17 |
} |
| indvdum@80 | 18 |
|
| indvdum@80 | 19 |
public void addBatcher(List<Batch> batches){
|
| indvdum@80 | 20 |
this.batches.addAll(batches); |
| indvdum@80 | 21 |
} |
| indvdum@80 | 22 |
|
| indvdum@80 | 23 |
@Override |
| indvdum@80 | 24 |
public void moving(Player proponent, Player opponent, PrintStream out) {
|
| indvdum@80 | 25 |
out.print(batches.poll()); |
| indvdum@80 | 26 |
} |
| indvdum@80 | 27 |
|
| indvdum@80 | 28 |
} |