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 Help implements ICard
11 public String getName() {
16 public IValue returnValue(final IValue iobj, Player proponent, Player opponent)
21 public String getName() {
26 public IValue returnValue(final IValue jobj, Player proponent, Player opponent)
31 public String getName() {
36 public IValue returnValue(final IValue nobj, Player proponent, Player opponent)
38 if(iobj instanceof Value && nobj instanceof Value)
40 int i = ((Value)iobj).getValue();
41 int n = ((Value)nobj).getValue();
43 if(i >= 0 && i <= 255)
45 int v = proponent.getSlot(i).getVitality();
49 if(jobj instanceof Value)
51 int j = ((Value)jobj).getValue();
53 if(j >= 0 && j <= 255)
55 int w = proponent.getSlot(j).getVitality();
59 int winc = (int) Math.floor(11 * n / 10);
62 proponent.getSlot(j).setVitality(resw > 65535 ? 65535 : resw);
69 throw new ICFPCException();
74 throw new ICFPCException();
79 throw new ICFPCException();
84 throw new ICFPCException();
89 throw new ICFPCException();