(no commit message)
authorakhmetovlz
Mon, 20 Jun 2011 01:59:45 +0400
changeset 124302ed98cb64c
parent 121 ea793ae43d3e
child 125 292347b71221
(no commit message)
src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java
     1.1 --- a/src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java	Mon Jun 20 01:48:37 2011 +0400
     1.2 +++ b/src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java	Mon Jun 20 01:59:45 2011 +0400
     1.3 @@ -38,8 +38,12 @@
     1.4  	{	
     1.5  		ArrayList<Batch> retArray = new ArrayList<Batch>();
     1.6  		
     1.7 -		retArray.addAll(smartAlg(0, number, targetSlot));
     1.8 -		
     1.9 +		if(number == 0){
    1.10 +			retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Put(), targetSlot));
    1.11 +			retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), targetSlot));
    1.12 +		}else{
    1.13 +			retArray.addAll(smartAlg(0, number, targetSlot));
    1.14 +		}
    1.15  		return retArray;
    1.16  	}
    1.17  	
    1.18 @@ -64,6 +68,9 @@
    1.19  			retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Put(), targetSlot));
    1.20  			retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), targetSlot));
    1.21  			retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Succ(), targetSlot));
    1.22 +			
    1.23 +			if(end == 0)
    1.24 +				return retArray;
    1.25  		}
    1.26  		
    1.27  		List<Batch> list1 = buildNumberOperations(0, end, targetSlot);