# HG changeset patch # User indvdum # Date 1308520852 -14400 # Node ID 292347b71221715d72dc7be40812831c9c5e93ba # Parent 6d4232b83c76d8a47e1d0d564ea2369a27c791fa# Parent 302ed98cb64ccb6b47bf4312cb578d56a6492208 * merge: diff -r 6d4232b83c76 -r 292347b71221 src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java --- a/src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java Mon Jun 20 02:00:10 2011 +0400 +++ b/src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java Mon Jun 20 02:00:52 2011 +0400 @@ -38,8 +38,12 @@ { ArrayList retArray = new ArrayList(); - retArray.addAll(smartAlg(0, number, targetSlot)); - + if(number == 0){ + retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Put(), targetSlot)); + retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), targetSlot)); + }else{ + retArray.addAll(smartAlg(0, number, targetSlot)); + } return retArray; } @@ -64,6 +68,9 @@ retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Put(), targetSlot)); retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), targetSlot)); retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Succ(), targetSlot)); + + if(end == 0) + return retArray; } List list1 = buildNumberOperations(0, end, targetSlot);