src/main/java/ru/alphatech/icfpc/game/AbstractPolicy.java
changeset 88 9555608af847
parent 87 0f4c762f56f7
parent 76 5955cb5e5ef3
child 89 b6543dcda026
equal deleted inserted replaced
87:0f4c762f56f7 88:9555608af847
   119 			}
   119 			}
   120 		}
   120 		}
   121 		return list;
   121 		return list;
   122 	}
   122 	}
   123 	
   123 	
   124 	protected ArrayList<Batch> BcombineForFunctWith3ParamsInRegister(ICard function, Slot processingSlot){
       
   125 		ArrayList<Batch> retArray = new ArrayList<Batch>();
       
   126 		
       
   127 		if(!(function instanceof Attack || function instanceof Help)){
       
   128 			throw new ICFPCException();
       
   129 		}
       
   130 		
       
   131 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new Put(), processingSlot));
       
   132 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, function,  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 Get(), 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 Zero(), 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 Get(), processingSlot));
       
   148 
       
   149 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   150 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   151 		
       
   152 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Succ(), processingSlot));
       
   153 		
       
   154 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   155 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   156 		
       
   157 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), processingSlot));
       
   158 		
       
   159 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   160 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   161 		
       
   162 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Get(), processingSlot));
       
   163 
       
   164 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   165 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   166 		
       
   167 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Succ(), processingSlot));
       
   168 		
       
   169 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   170 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   171 		
       
   172 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Succ(), processingSlot));
       
   173 		
       
   174 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new K(), processingSlot));
       
   175 		retArray.add(new Batch(OperationType.CARD_TO_SLOT, new S(), processingSlot));
       
   176 		
       
   177 		retArray.add(new Batch(OperationType.SLOT_TO_CARD, new Zero(), processingSlot));
       
   178 		
       
   179 		return retArray;
       
   180 	}
       
   181 	
       
   182 	public abstract ArrayList<Batch> getBatches();
   124 	public abstract ArrayList<Batch> getBatches();
   183 	
   125 	
   184 	public static void main(String[] args)
   126 	public static void main(String[] args)
   185 	{
   127 	{
   186 		Slot slot = new Slot();
   128 		Slot slot = new Slot();