1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/main/java/ru/alphatech/icfpc/policy/AttackHelpDelayPolicy.java Mon Jun 20 01:42:04 2011 +0400
1.3 @@ -0,0 +1,40 @@
1.4 +package ru.alphatech.icfpc.policy;
1.5 +
1.6 +import java.util.ArrayList;
1.7 +
1.8 +import ru.alphatech.icfpc.game.Batch;
1.9 +import ru.alphatech.icfpc.game.Slot;
1.10 +
1.11 +
1.12 +public class AttackHelpDelayPolicy extends AttackHelpPolicy{
1.13 +
1.14 + private int registerFor3thParam = 2;
1.15 +
1.16 + /**
1.17 + * Сохранить как функцию в ячейке
1.18 + * При этом последний аргумент будет ссылать на регистр
1.19 + * пользователь сам должен менят регистр когда ему это понадобиться
1.20 + * первые 2 параметра статичны
1.21 + * @param type
1.22 + * @param processingSlot
1.23 + * @param donor
1.24 + * @param target
1.25 + * @param registerFor3thParam - номер регистра (не слота)
1.26 + */
1.27 + public AttackHelpDelayPolicy(TYPE type, int processingSlot, int donor, int target, int registerFor3thParam) {
1.28 + super(type, processingSlot, donor, target, -1);
1.29 + this.registerFor3thParam = registerFor3thParam;
1.30 + }
1.31 +
1.32 + protected ArrayList<Batch> registerChangingBatches(Slot processingSlot){
1.33 + return new ArrayList<Batch>();
1.34 + }
1.35 +
1.36 + protected int get3thRegisterIndex(){
1.37 + return registerFor3thParam;
1.38 + }
1.39 +
1.40 + protected boolean execute(){
1.41 + return false;
1.42 + }
1.43 +}