1.1 --- a/src/main/java/ru/alphatech/icfpc/cards/Get.java Sun Jun 19 13:14:18 2011 +0400
1.2 +++ b/src/main/java/ru/alphatech/icfpc/cards/Get.java Sun Jun 19 13:31:13 2011 +0400
1.3 @@ -1,5 +1,6 @@
1.4 package ru.alphatech.icfpc.cards;
1.5
1.6 +import ru.alphatech.icfpc.game.ICFPCException;
1.7 import ru.alphatech.icfpc.game.IValue;
1.8 import ru.alphatech.icfpc.game.Player;
1.9 import ru.alphatech.icfpc.game.Value;
1.10 @@ -11,11 +12,20 @@
1.11 {
1.12 if (value.getClass().equals(Value.class))
1.13 {
1.14 - return proponent.getSlot(((Value)value).getValue()).getValue();
1.15 + int i = ((Value)value).getValue();
1.16 +
1.17 + if(i >= 0 && i <= 255)
1.18 + {
1.19 + return proponent.getSlot(i).getValue();
1.20 + }
1.21 + else
1.22 + {
1.23 + throw new ICFPCException();
1.24 + }
1.25 }
1.26 else
1.27 {
1.28 - return new Value(-100);
1.29 + throw new ICFPCException();
1.30 }
1.31 }
1.32