| changeset 2 | 41d78f336ede |
| child 4 | 6b4afd8720b8 |
| 1:191517e224e0 | 2:41d78f336ede |
|---|---|
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 Get implements ICard |
|
8 { |
|
9 @Override |
|
10 public IValue returnValue(IValue[] values, Slot[] slots) |
|
11 { |
|
12 if (values[0].getClass().equals(Value.class)) |
|
13 { |
|
14 return slots[((Value)values[0]).getValue()].getValue(); |
|
15 } |
|
16 else |
|
17 { |
|
18 return new Value(-100); |
|
19 } |
|
20 } |
|
21 |
|
22 } |