Cards done. Only interpretation of zero card is under question mark.
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 Revive implements ICard
11 public IValue returnValue(IValue iobj, Player proponent, Player opponent)
13 if (iobj instanceof Value)
15 int i = ((Value)iobj).getValue();
17 if (i >= 0 && i <= 255)
19 int v = proponent.getSlot(i).getVitality();
23 proponent.getSlot(i).setVitality(1);
30 throw new ICFPCException();
35 throw new ICFPCException();