1.1 --- a/src/main/java/ru/alphatech/icfpc/cards/Inc.java Sun Jun 19 17:53:59 2011 +0400
1.2 +++ b/src/main/java/ru/alphatech/icfpc/cards/Inc.java Sun Jun 19 18:42:07 2011 +0400
1.3 @@ -3,11 +3,17 @@
1.4 import ru.alphatech.icfpc.game.ICFPCException;
1.5 import ru.alphatech.icfpc.game.IValue;
1.6 import ru.alphatech.icfpc.game.Player;
1.7 +import ru.alphatech.icfpc.game.Run;
1.8 import ru.alphatech.icfpc.game.Value;
1.9
1.10 public class Inc implements ICard
1.11 {
1.12 @Override
1.13 + public String getName() {
1.14 + return "inc";
1.15 + }
1.16 +
1.17 + @Override
1.18 public IValue returnValue(IValue iobj, Player proponent, Player opponent)
1.19 {
1.20 if(iobj instanceof Value)
1.21 @@ -18,9 +24,19 @@
1.22 {
1.23 int v = proponent.getSlot(i).getVitality();
1.24
1.25 - if (v > 0 && v < 65535)
1.26 + if(Run.getAutoMode())
1.27 {
1.28 - proponent.getSlot(i).setVitality(v + 1);
1.29 + if(v > 0)
1.30 + {
1.31 + proponent.getSlot(i).setVitality(v - 1);
1.32 + }
1.33 + }
1.34 + else
1.35 + {
1.36 + if (v > 0 && v < 65535)
1.37 + {
1.38 + proponent.getSlot(i).setVitality(v + 1);
1.39 + }
1.40 }
1.41
1.42 return new I();