diff -r f8281a814079 -r 2c94d860cd24 src/main/java/ru/alphatech/icfpc/cards/Get.java --- a/src/main/java/ru/alphatech/icfpc/cards/Get.java Sun Jun 19 13:14:18 2011 +0400 +++ b/src/main/java/ru/alphatech/icfpc/cards/Get.java Sun Jun 19 13:31:13 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(); } }