Cards done. Only interpretation of zero card is under question mark.
1 package ru.alphatech.icfpc.policy;
3 import java.util.ArrayList;
5 import ru.alphatech.icfpc.cards.Attack;
6 import ru.alphatech.icfpc.game.AbstractPolicy;
7 import ru.alphatech.icfpc.game.Batch;
8 import ru.alphatech.icfpc.game.Run;
9 import ru.alphatech.icfpc.game.Slot;
11 public class AttackPolicy extends AbstractPolicy {
13 private int donorSlotIndex = -1;
14 private int targetSlotIndex = -1;
15 private int pointsSlotIndex = -1;
16 private int processingSlotIndex = -1;
18 public AttackPolicy(int processingSlot, int donor, int target, int points) {
19 this.donorSlotIndex = donor;
20 this.targetSlotIndex = target;
21 this.pointsSlotIndex = points;
22 this.processingSlotIndex = processingSlot;
26 public ArrayList<Batch> getBatches() {
27 ArrayList<Batch> retArray = new ArrayList<Batch>();
29 Slot processingSlot = Run.getProponent().getSlot(processingSlotIndex);
31 numberIntoSlotField(Run.getRegisterByIndex(0), donorSlotIndex);
32 numberIntoSlotField(Run.getRegisterByIndex(1), targetSlotIndex);
33 numberIntoSlotField(Run.getRegisterByIndex(2), pointsSlotIndex);
35 retArray.addAll(BcombineForFunctWith3ParamsInRegister(new Attack(), processingSlot));