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;
11 import java.util.List;
13 import ru.alphatech.icfpc.game.strategy.IStrategy;
14 import ru.alphatech.icfpc.game.strategy.SimplyStrategy;
18 private static boolean automodeapply = false;
20 private static boolean endgame = false;
22 private static Player proponent = new Player();
24 private static Player opponent = new Player();
26 private static int registers[] = new int[4];
35 private static IStrategy strategy = new SimplyStrategy();
37 public static Slot getRegisterByIndex(int registerIdex){
38 return proponent.getSlot( registers[registerIdex] );
41 public static Player getOpponent(){
45 public static Player getProponent(){
49 private static void readOpponent() throws IOException
51 BufferedReader breader = new BufferedReader(new InputStreamReader(System.in));
52 String turnCase = breader.readLine();
56 if("1".equals(turnCase))
58 card = breader.readLine();
59 slot = breader.readLine();
61 else if("2".equals(turnCase))
63 slot = breader.readLine();
64 card = breader.readLine();
71 if(turnCase == null || card == null || slot == null)
77 private static void writeMove()
79 strategy.moving(proponent, opponent, System.out);
82 public static boolean getAutoMode()
87 public static void main(String[] args) throws IOException
89 String playerNum = args[0];
91 if("1".equals(playerNum))