diff -r 57368a3d0b15 -r 643b85a8a16b src/main/java/ru/alphatech/icfpc/game/Player.java --- a/src/main/java/ru/alphatech/icfpc/game/Player.java Sun Jun 19 19:14:45 2011 +0400 +++ b/src/main/java/ru/alphatech/icfpc/game/Player.java Sun Jun 19 19:44:06 2011 +0400 @@ -11,7 +11,7 @@ public Player() { - for(int i = 0; i < 255; i++) + for(int i = 0; i <= 255; i++) { slots[i] = new Slot(i); } @@ -35,13 +35,26 @@ } public void applyBatch(Batch batch){ - switch(batch.operationType){ - case CARD_TO_SLOT: - batch.card.returnValue(getSlot(batch.slot.getId()).getValue(), this, myOpponent); - break; - case SLOT_TO_CARD: - getSlot(batch.slot.getId()).getValue().returnValue(batch.card, this, myOpponent); - break; + Run.setAutoMode(false); + Run.resetCallCount(); + try{ + switch(batch.operationType){ + case CARD_TO_SLOT: + batch.card.returnValue(getSlot(batch.slot.getId()).getValue(), this, myOpponent); + break; + case SLOT_TO_CARD: + getSlot(batch.slot.getId()).getValue().returnValue(batch.card, this, myOpponent); + break; + } + } catch (ICFPCException exception){ + getSlot(batch.slot.getId()).putValue(new I()); + } + Run.setAutoMode(true); + Run.resetCallCount(); + for(Slot slot: myOpponent.slots){ + if(slot.isZombie()){ + slot.getValue().returnValue(new I(), myOpponent, myOpponent.getMyOpponent()); + } } }