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.Value;
8 public class Inc implements ICard
11 public String getName() {
16 public IValue returnValue(IValue iobj, Player proponent, Player opponent)
18 if(iobj instanceof Value)
20 int i = ((Value)iobj).getValue();
22 if (i >= 0 && i <= 255)
24 int v = proponent.getSlot(i).getVitality();
26 if (v > 0 && v < 65535)
28 proponent.getSlot(i).setVitality(v + 1);
35 throw new ICFPCException();
40 throw new ICFPCException();