equal
deleted
inserted
replaced
|
1 package ru.alpha.ltg.cards; |
|
2 |
|
3 import ru.alpha.ltg.cards.api.ICard; |
|
4 import ru.alpha.ltg.cards.api.IValue; |
|
5 import ru.alpha.ltg.cards.api.Value; |
|
6 |
|
7 public class Dbl implements ICard |
|
8 { |
|
9 @Override |
|
10 public IValue returnValue(IValue[] values, Slot[] slots) |
|
11 { |
|
12 IValue n = values[0]; |
|
13 |
|
14 if(n.getClass().equals(Value.class)) |
|
15 { |
|
16 if (((Value)n).getValue() * 2 >= 65535) |
|
17 { |
|
18 return new Value(65535); |
|
19 } |
|
20 return new Value(((Value)n).getValue() * 2); |
|
21 } |
|
22 |
|
23 return new Value(-100); |
|
24 } |
|
25 } |