| author | indvdum |
| Sun, 19 Jun 2011 17:35:56 +0400 | |
| changeset 90 | 774e7ce00b5f |
| parent 80 | fcdce54b2f25 |
| 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@90 | 24 |
public Batch move(Player proponent, Player opponent) {
|
| indvdum@90 | 25 |
return batches.poll(); |
| indvdum@80 | 26 |
} |
| indvdum@80 | 27 |
|
| indvdum@80 | 28 |
} |