4 * Time: 18.06.2011 11:37:46 |
4 * Time: 18.06.2011 11:37:46 |
5 ***********************************************/ |
5 ***********************************************/ |
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.File; |
|
10 import java.io.FileWriter; |
|
11 import java.io.IOException; |
9 import java.io.IOException; |
12 import java.io.InputStreamReader; |
10 import java.io.InputStreamReader; |
13 import java.io.PrintWriter; |
11 import java.util.ArrayList; |
|
12 import java.util.LinkedList; |
|
13 import java.util.List; |
14 |
14 |
15 public class Run |
15 public class Run |
16 { |
16 { |
17 private static boolean endgame = false; |
17 private static boolean endgame = false; |
18 |
18 |
19 private static Player proponent = new Player(); |
19 private static Player proponent = new Player(); |
20 |
20 |
21 private static Player opponent = new Player(); |
21 private static Player opponent = new Player(); |
22 |
22 |
|
23 private LinkedList<Batch> batches = new LinkedList<Batch>(); |
|
24 |
|
25 public void clearBatcher(){ |
|
26 batches.removeAll(batches); |
|
27 } |
|
28 |
|
29 public void addBatcher(List<Batch> batches){ |
|
30 this.batches.addAll(this.batches); |
|
31 } |
|
32 |
23 private static void readOpponent() throws IOException |
33 private static void readOpponent() throws IOException |
24 { |
34 { |
25 BufferedReader breader = new BufferedReader(new InputStreamReader(System.in)); |
35 BufferedReader breader = new BufferedReader(new InputStreamReader(System.in)); |
|
36 String turnCase = breader.readLine(); |
|
37 String card = null; |
|
38 String slot = null; |
26 |
39 |
27 String l1 = breader.readLine(); |
40 if("1".equals(turnCase)) |
28 String l2 = breader.readLine(); |
41 { |
29 String l3 = breader.readLine(); |
42 card = breader.readLine(); |
|
43 slot = breader.readLine(); |
|
44 } |
|
45 else if("2".equals(turnCase)) |
|
46 { |
|
47 slot = breader.readLine(); |
|
48 card = breader.readLine(); |
|
49 } |
|
50 else |
|
51 { |
|
52 // do nothing |
|
53 } |
30 |
54 |
31 if(l1 == null || l2 == null || l3 == null) |
55 if(turnCase == null || card == null || slot == null) |
32 { |
56 { |
33 endgame = true; |
57 endgame = true; |
34 } |
58 } |
35 } |
59 } |
36 |
60 |