equal
deleted
inserted
replaced
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; |
11 import java.util.LinkedList; |
12 import java.util.List; |
12 import java.util.List; |
|
13 |
|
14 import ru.alphatech.icfpc.game.strategy.IStrategy; |
|
15 import ru.alphatech.icfpc.game.strategy.SimplyStrategy; |
13 |
16 |
14 public class Run |
17 public class Run |
15 { |
18 { |
16 private static boolean endgame = false; |
19 private static boolean endgame = false; |
17 |
20 |
27 registers[0] = 0; |
30 registers[0] = 0; |
28 registers[1] = 1; |
31 registers[1] = 1; |
29 registers[2] = 2; |
32 registers[2] = 2; |
30 registers[3] = 3; |
33 registers[3] = 3; |
31 } |
34 } |
|
35 |
|
36 private static IStrategy strategy = new SimplyStrategy(); |
32 |
37 |
33 public static Slot getRegisterByIndex(int registerIdex){ |
38 public static Slot getRegisterByIndex(int registerIdex){ |
34 return proponent.getSlot( registers[registerIdex] ); |
39 return proponent.getSlot( registers[registerIdex] ); |
35 } |
40 } |
36 |
41 |
78 } |
83 } |
79 } |
84 } |
80 |
85 |
81 private static void writeMove() |
86 private static void writeMove() |
82 { |
87 { |
83 System.out.print(1 + "\n"); |
88 strategy.moving(proponent, opponent, System.out); |
84 System.out.print("I" + "\n"); |
|
85 System.out.print(0 + "\n"); |
|
86 } |
89 } |
87 |
90 |
88 public static void main(String[] args) throws IOException |
91 public static void main(String[] args) throws IOException |
89 { |
92 { |
90 String playerNum = args[0]; |
93 String playerNum = args[0]; |