src/main/java/ru/alphatech/icfpc/cards/Copy.java
author Azamat S. Kalimoulline <turtle@bazon.ru>
Sun, 19 Jun 2011 11:14:05 +0400
changeset 28 7ff8ba5fb4cf
parent 12 042162c73d0f
child 35 743564afa994
permissions -rw-r--r--
Player slots.
     1 package ru.alphatech.icfpc.cards;
     2 
     3 import ru.alphatech.icfpc.game.IValue;
     4 import ru.alphatech.icfpc.game.Player;
     5 import ru.alphatech.icfpc.game.Value;
     6 
     7 public class Copy implements ICard
     8 {
     9 	@Override
    10 	public IValue returnValue(IValue i, Player proponent, Player opponent)
    11 	{
    12 		if (i.getClass().equals(Value.class))
    13 		{
    14 			return opponent.getSlot(((Value)i).getValue()).getValue();
    15 		}
    16 
    17 		return null;
    18 	}
    19 }