1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/ru.alpha.ltg.cards/src/test/java/ru/alpha/ltg/cards/Get.java Fri Jun 17 18:49:51 2011 +0400
1.3 @@ -0,0 +1,22 @@
1.4 +package ru.alpha.ltg.cards;
1.5 +
1.6 +import ru.alpha.ltg.cards.api.ICard;
1.7 +import ru.alpha.ltg.cards.api.IValue;
1.8 +import ru.alpha.ltg.cards.api.Value;
1.9 +
1.10 +public class Get implements ICard
1.11 +{
1.12 + @Override
1.13 + public IValue returnValue(IValue[] values, Slot[] slots)
1.14 + {
1.15 + if (values[0].getClass().equals(Value.class))
1.16 + {
1.17 + return slots[((Value)values[0]).getValue()].getValue();
1.18 + }
1.19 + else
1.20 + {
1.21 + return new Value(-100);
1.22 + }
1.23 + }
1.24 +
1.25 +}