src/main/java/ru/alphatech/icfpc/game/Run.java
changeset 126 6aa46f954627
parent 122 845c89fa268e
child 127 57ee53a3cf56
child 133 efaeeba4c99c
equal deleted inserted replaced
125:292347b71221 126:6aa46f954627
    70 	
    70 	
    71 	public static Player getProponent(){
    71 	public static Player getProponent(){
    72 		return proponent;
    72 		return proponent;
    73 	}
    73 	}
    74 	
    74 	
       
    75 	private static String[] doDebugRead()
       
    76 	{
       
    77 		return new String[] {"1", "I", "0"};
       
    78 	}
       
    79 	
       
    80 	private static String[] doRealRead() throws IOException
       
    81 	{
       
    82 		BufferedReader breader = new BufferedReader(new InputStreamReader(System.in));
       
    83 
       
    84 		return new String[] {breader.readLine(), breader.readLine(), breader.readLine()};
       
    85 	}
       
    86 	
    75 	private static void readOpponent() throws IOException
    87 	private static void readOpponent() throws IOException
    76 	{
    88 	{
    77 		BufferedReader breader = new BufferedReader(new InputStreamReader(System.in));
    89 		String[] readData = doRealRead();
    78 		String sTurnCase = breader.readLine();
    90 		String sTurnCase = readData[0];
    79 		String sCard = null;
    91 		String sCard = null;
    80 		String sSlot = null;
    92 		String sSlot = null;
    81 		
    93 		
    82 		OperationType operationType = null;
    94 		OperationType operationType = null;
    83 		ICard card = null;
    95 		ICard card = null;
    84 		Slot slot = null;
    96 		Slot slot = null;
    85 		
    97 		
    86 		if("1".equals(sTurnCase))
    98 		if("1".equals(sTurnCase))
    87 		{
    99 		{
    88 			sCard = breader.readLine();
   100 			sCard = readData[1];
    89 			sSlot = breader.readLine();
   101 			sSlot = readData[2];
    90 			operationType = OperationType.CARD_TO_SLOT;
   102 			operationType = OperationType.CARD_TO_SLOT;
    91 		}
   103 		}
    92 		else if("2".equals(sTurnCase))
   104 		else if("2".equals(sTurnCase))
    93 		{
   105 		{
    94 			sSlot = breader.readLine();
   106 			sSlot = readData[1];
    95 			sCard = breader.readLine();
   107 			sCard = readData[2];
    96 			operationType = OperationType.SLOT_TO_CARD;
   108 			operationType = OperationType.SLOT_TO_CARD;
    97 		}
   109 		}
    98 		else
   110 		else
    99 		{
   111 		{
   100 			// do nothing
   112 			// do nothing