Reading opponent input.
1 /***********************************************
3 * بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِِ
4 * Time: 18.06.2011 11:37:46
5 ***********************************************/
6 package ru.alphatech.icfpc.game;
8 import java.io.BufferedReader;
9 import java.io.IOException;
10 import java.io.InputStreamReader;
14 private static boolean endgame = false;
16 private static Player proponent = new Player();
18 private static Player opponent = new Player();
20 private static void readOpponent() throws IOException
22 BufferedReader breader = new BufferedReader(new InputStreamReader(System.in));
23 String turnCase = breader.readLine();
27 if("1".equals(turnCase))
29 card = breader.readLine();
30 slot = breader.readLine();
32 else if("2".equals(turnCase))
34 slot = breader.readLine();
35 card = breader.readLine();
42 if(turnCase == null || card == null || slot == null)
48 private static void writeMove()
50 System.out.print(1 + "\n");
51 System.out.print("I" + "\n");
52 System.out.print(0 + "\n");
55 public static void main(String[] args) throws IOException
57 String playerNum = args[0];
59 if("1".equals(playerNum))