equal
deleted
inserted
replaced
12 { |
12 { |
13 if(value.getClass().equals(Value.class)) |
13 if(value.getClass().equals(Value.class)) |
14 { |
14 { |
15 int i = ((Value)value).getValue(); |
15 int i = ((Value)value).getValue(); |
16 |
16 |
17 if (i < 256 && i > 0) |
17 if (i >= 0 && i <= 255) |
18 { |
18 { |
19 int v = proponent.getSlot(i).getVitality(); |
19 int v = proponent.getSlot(i).getVitality(); |
20 if (v < 65535 && v > 0) |
20 |
|
21 if (v > 0 && v < 65535) |
21 { |
22 { |
22 proponent.getSlot(i).setVitality(v + 1); |
23 proponent.getSlot(i).setVitality(v + 1); |
23 } |
24 } |
|
25 |
|
26 return new I(); |
24 } |
27 } |
25 else |
28 else |
26 { |
29 { |
27 throw new ICFPCException(); |
30 throw new ICFPCException(); |
28 } |
31 } |
29 } |
32 } |
30 else |
33 else |
31 { |
34 { |
32 throw new ICFPCException(); |
35 throw new ICFPCException(); |
33 } |
36 } |
34 |
|
35 return new I(); |
|
36 } |
37 } |
37 } |
38 } |