1 package ru.alphatech.icfpc.game;
3 import ru.alphatech.icfpc.cards.I;
9 private Slot[] slots = new Slot[256];
10 private Player myOpponent = null;
14 for(int i = 0; i <= 255; i++)
16 slots[i] = new Slot(i);
20 public Player getMyOpponent() {
24 public void setMyOpponent(Player myOpponent) {
25 this.myOpponent = myOpponent;
28 public Slot getSlot(int i)
33 public PlayerStatistic getStatistic(){
34 throw new RuntimeException("Not impilemented yet.");
37 public void applyBatch(Batch batch){
38 Run.setAutoMode(false);
41 switch(batch.operationType){
43 batch.card.returnValue(getSlot(batch.slot.getId()).getValue(), this, myOpponent);
46 getSlot(batch.slot.getId()).getValue().returnValue(batch.card, this, myOpponent);
49 } catch (ICFPCException exception){
50 getSlot(batch.slot.getId()).putValue(new I());
52 Run.setAutoMode(true);
54 for(Slot slot: myOpponent.slots){
56 slot.getValue().returnValue(new I(), myOpponent, myOpponent.getMyOpponent());