Мего метод.
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 Dec implements ICard
11 public IValue returnValue(IValue value, Player proponent, Player opponent)
13 if(value.getClass().equals(Value.class))
15 int i = ((Value)value).getValue();
19 int v = proponent.getSlot(255 - i).getVitality();
20 if (v < 65535 && v > 0)
22 proponent.getSlot(255 - i).setVitality(proponent.getSlot(255 - i).getVitality() - 1);
27 throw new ICFPCException();
32 throw new ICFPCException();
35 return new Value(-100);