equal
deleted
inserted
replaced
6 package ru.alphatech.icfpc.game; |
6 package ru.alphatech.icfpc.game; |
7 |
7 |
8 import java.io.BufferedReader; |
8 import java.io.BufferedReader; |
9 import java.io.IOException; |
9 import java.io.IOException; |
10 import java.io.InputStreamReader; |
10 import java.io.InputStreamReader; |
11 import java.util.LinkedList; |
|
12 import java.util.List; |
|
13 |
11 |
14 import ru.alphatech.icfpc.game.strategy.IStrategy; |
12 import ru.alphatech.icfpc.game.strategy.IStrategy; |
15 import ru.alphatech.icfpc.game.strategy.SimplyStrategy; |
13 import ru.alphatech.icfpc.game.strategy.SimplyStrategy; |
16 |
14 |
17 public class Run |
15 public class Run |
22 |
20 |
23 private static Player proponent = new Player(); |
21 private static Player proponent = new Player(); |
24 |
22 |
25 private static Player opponent = new Player(); |
23 private static Player opponent = new Player(); |
26 |
24 |
27 private static LinkedList<Batch> batches = new LinkedList<Batch>(); |
|
28 |
|
29 private static int registers[] = new int[4]; |
25 private static int registers[] = new int[4]; |
30 |
26 |
31 static { |
27 static { |
32 registers[0] = 0; |
28 registers[0] = 0; |
33 registers[1] = 1; |
29 registers[1] = 1; |
37 |
33 |
38 private static IStrategy strategy = new SimplyStrategy(); |
34 private static IStrategy strategy = new SimplyStrategy(); |
39 |
35 |
40 public static Slot getRegisterByIndex(int registerIdex){ |
36 public static Slot getRegisterByIndex(int registerIdex){ |
41 return proponent.getSlot( registers[registerIdex] ); |
37 return proponent.getSlot( registers[registerIdex] ); |
42 } |
|
43 |
|
44 public static void clearBatcher(){ |
|
45 batches.removeAll(batches); |
|
46 } |
|
47 |
|
48 public static void addBatcher(List<Batch> batches){ |
|
49 batches.addAll(batches); |
|
50 } |
38 } |
51 |
39 |
52 public static Player getOpponent(){ |
40 public static Player getOpponent(){ |
53 return opponent; |
41 return opponent; |
54 } |
42 } |