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 Zombie implements ICard
11 public IValue returnValue(final IValue iobj, Player proponent, Player opponent)
16 public IValue returnValue(final IValue x, Player proponent, Player opponent)
18 if (iobj instanceof Value)
20 int i = ((Value)iobj).getValue();
22 if (i >= 0 && i <= 255)
24 int v = opponent.getSlot(255 - i).getVitality();
28 opponent.getSlot(255 - i).putValue(x);
29 opponent.getSlot(255 - i).setVitality(-1);
35 throw new ICFPCException();
40 throw new ICFPCException();
45 throw new ICFPCException();