equal
deleted
inserted
replaced
11 public IValue returnValue(IValue iobj, Player proponent, Player opponent) |
11 public IValue returnValue(IValue iobj, Player proponent, Player opponent) |
12 { |
12 { |
13 if (iobj instanceof Value) |
13 if (iobj instanceof Value) |
14 { |
14 { |
15 int i = ((Value)iobj).getValue(); |
15 int i = ((Value)iobj).getValue(); |
16 int v = proponent.getSlot(i).getVitality(); |
|
17 |
16 |
18 if(i >= 0 && i <= 255 && v > 0) |
17 if(i >= 0 && i <= 255) |
19 { |
18 { |
20 return proponent.getSlot(i).getValue(); |
19 int v = proponent.getSlot(i).getVitality(); |
|
20 |
|
21 if(v > 0) |
|
22 { |
|
23 return proponent.getSlot(i).getValue(); |
|
24 } |
|
25 else |
|
26 { |
|
27 throw new ICFPCException(); |
|
28 } |
21 } |
29 } |
22 else |
30 else |
23 { |
31 { |
24 throw new ICFPCException(); |
32 throw new ICFPCException(); |
25 } |
33 } |