src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java
changeset 76 5955cb5e5ef3
parent 62 3252fb664a39
child 88 9555608af847
equal deleted inserted replaced
75:40ad0dd24185 76:5955cb5e5ef3
    89 			end = end / 2; 
    89 			end = end / 2; 
    90 		}
    90 		}
    91 		return retArray;
    91 		return retArray;
    92 	}
    92 	}
    93 	
    93 	
    94 	protected ArrayList<Batch> BcombineForFunctWith3ParamsInRegister(ICard function, Slot processingSlot){
       
    95 		ArrayList<Batch> retArray = new ArrayList<Batch>();
       
    96 		
       
    97 		if(!(function instanceof Attack || function instanceof Help)){
       
    98 			throw new ICFPCException();
       
    99 		}
       
   100 		
       
   101 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Put(), processingSlot));
       
   102 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, function,  processingSlot));
       
   103 		
       
   104 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   105 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   106 		
       
   107 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Get(), processingSlot));
       
   108 
       
   109 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   110 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   111 		
       
   112 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), processingSlot));
       
   113 		
       
   114 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   115 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   116 		
       
   117 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Get(), processingSlot));
       
   118 
       
   119 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   120 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   121 		
       
   122 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Succ(), processingSlot));
       
   123 		
       
   124 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   125 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   126 		
       
   127 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), processingSlot));
       
   128 		
       
   129 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   130 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   131 		
       
   132 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Get(), processingSlot));
       
   133 
       
   134 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   135 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   136 		
       
   137 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Succ(), processingSlot));
       
   138 		
       
   139 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   140 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   141 		
       
   142 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Succ(), processingSlot));
       
   143 		
       
   144 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   145 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   146 		
       
   147 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), processingSlot));
       
   148 		
       
   149 		return retArray;
       
   150 	}
       
   151 	
       
   152 	public abstract ArrayList<Batch> getBatches();
    94 	public abstract ArrayList<Batch> getBatches();
   153 }
    95 }