1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/main/java/ru/alphatech/icfpc/cards/Copy.java Sat Jun 18 11:27:09 2011 +0400
1.3 @@ -0,0 +1,20 @@
1.4 +package ru.alphatech.icfpc.cards;
1.5 +
1.6 +import ru.alphatech.icfpc.cards.api.ICard;
1.7 +import ru.alphatech.icfpc.cards.api.IPlayer;
1.8 +import ru.alphatech.icfpc.cards.api.IValue;
1.9 +import ru.alphatech.icfpc.cards.api.Value;
1.10 +
1.11 +public class Copy implements ICard
1.12 +{
1.13 + @Override
1.14 + public IValue returnValue(IValue i, IPlayer proponent, IPlayer opponent)
1.15 + {
1.16 + if (i.getClass().equals(Value.class))
1.17 + {
1.18 + return opponent.getSlot(((Value)i).getValue()).getValue();
1.19 + }
1.20 +
1.21 + return null;
1.22 + }
1.23 +}