equal
deleted
inserted
replaced
1 package ru.alpha.ltg.cards; |
1 package ru.alpha.ltg.cards; |
2 |
2 |
3 import ru.alpha.ltg.cards.api.ICard; |
3 import ru.alpha.ltg.cards.api.ICard; |
|
4 import ru.alpha.ltg.cards.api.IPlayer; |
4 import ru.alpha.ltg.cards.api.IValue; |
5 import ru.alpha.ltg.cards.api.IValue; |
5 import ru.alpha.ltg.cards.api.Value; |
6 import ru.alpha.ltg.cards.api.Value; |
6 |
7 |
7 public class Get implements ICard |
8 public class Get implements ICard |
8 { |
9 { |
9 @Override |
10 @Override |
10 public IValue returnValue(IValue[] values, Slot[] slots) |
11 public IValue returnValue(IValue value, IPlayer proponent, IPlayer opponent) |
11 { |
12 { |
12 if (values[0].getClass().equals(Value.class)) |
13 if (value.getClass().equals(Value.class)) |
13 { |
14 { |
14 return slots[((Value)values[0]).getValue()].getValue(); |
15 return proponent.getSlot(((Value)value).getValue()).getValue(); |
15 } |
16 } |
16 else |
17 else |
17 { |
18 { |
18 return new Value(-100); |
19 return new Value(-100); |
19 } |
20 } |