diff -r 0e21db22ecec -r 743564afa994 src/main/java/ru/alphatech/icfpc/cards/Copy.java --- a/src/main/java/ru/alphatech/icfpc/cards/Copy.java Sun Jun 19 10:50:46 2011 +0400 +++ b/src/main/java/ru/alphatech/icfpc/cards/Copy.java Sun Jun 19 12:12:55 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,9 +12,20 @@ { if (i.getClass().equals(Value.class)) { - return opponent.getSlot(((Value)i).getValue()).getValue(); + int iVal = ((Value)i).getValue(); + if (iVal >= 0 && iVal < 256) + { + return opponent.getSlot(((Value)i).getValue()).getValue(); + } + else + { + throw new ICFPCException(); + } + } + else + { + throw new ICFPCException(); } - return null; } }