diff -r 126046a20107 -r 0ffe63f2aa46 src/main/java/ru/alphatech/icfpc/cards/Get.java --- a/src/main/java/ru/alphatech/icfpc/cards/Get.java Sun Jun 19 13:36:19 2011 +0400 +++ b/src/main/java/ru/alphatech/icfpc/cards/Get.java Sun Jun 19 13:36:53 2011 +0400 @@ -1,5 +1,6 @@ package ru.alphatech.icfpc.cards; +import ru.alphatech.icfpc.game.ICFPCException; import ru.alphatech.icfpc.game.IValue; import ru.alphatech.icfpc.game.Player; import ru.alphatech.icfpc.game.Value; @@ -11,11 +12,20 @@ { if (value.getClass().equals(Value.class)) { - return proponent.getSlot(((Value)value).getValue()).getValue(); + int i = ((Value)value).getValue(); + + if(i >= 0 && i <= 255) + { + return proponent.getSlot(i).getValue(); + } + else + { + throw new ICFPCException(); + } } else { - return new Value(-100); + throw new ICFPCException(); } }