equal
deleted
inserted
replaced
3 import ru.alphatech.icfpc.game.ICFPCException; |
3 import ru.alphatech.icfpc.game.ICFPCException; |
4 import ru.alphatech.icfpc.game.IValue; |
4 import ru.alphatech.icfpc.game.IValue; |
5 import ru.alphatech.icfpc.game.Player; |
5 import ru.alphatech.icfpc.game.Player; |
6 import ru.alphatech.icfpc.game.Value; |
6 import ru.alphatech.icfpc.game.Value; |
7 |
7 |
8 public class Get implements ICard |
8 public class Get extends AbstractCard |
9 { |
9 { |
10 @Override |
10 @Override |
11 public String getName() { |
11 public String getName() { |
12 return "get"; |
12 return "get"; |
13 } |
13 } |
14 |
14 |
15 @Override |
15 @Override |
16 public IValue returnValue(IValue iobj, Player proponent, Player opponent) |
16 public IValue returnValue(IValue iobj, Player proponent, Player opponent) |
17 { |
17 { |
|
18 incAndTest(); |
|
19 |
18 if (iobj instanceof Value) |
20 if (iobj instanceof Value) |
19 { |
21 { |
20 int i = ((Value)iobj).getValue(); |
22 int i = ((Value)iobj).getValue(); |
21 |
23 |
22 if(i >= 0 && i <= 255) |
24 if(i >= 0 && i <= 255) |