Call Count.
1 package ru.alphatech.icfpc.cards;
3 import ru.alphatech.icfpc.game.ICFPCException;
4 import ru.alphatech.icfpc.game.IValue;
5 import ru.alphatech.icfpc.game.Player;
6 import ru.alphatech.icfpc.game.Run;
7 import ru.alphatech.icfpc.game.Value;
9 public class Dec extends AbstractCard
12 public String getName() {
17 public IValue returnValue(IValue iobj, Player proponent, Player opponent)
21 if(iobj instanceof Value)
23 int i = ((Value)iobj).getValue();
25 if (i >= 0 && i <= 255)
27 int v = proponent.getSlot(255 - i).getVitality();
31 if(v > 0 && v < 65535)
33 proponent.getSlot(255 - i).setVitality(v + 1);
40 proponent.getSlot(255 - i).setVitality(v - 1);
48 throw new ICFPCException();
53 throw new ICFPCException();