package ru.alpha.ltg.cards;

import ru.alpha.ltg.cards.api.ICard;
import ru.alpha.ltg.cards.api.IValue;
import ru.alpha.ltg.cards.api.Value;

public class Dbl implements ICard
{
	@Override
	public IValue returnValue(IValue[] values, Slot[] slots)
	{
		IValue n = values[0];

		if(n.getClass().equals(Value.class))
		{
			if (((Value)n).getValue() * 2 >= 65535)
			{
				return new Value(65535);
			}
			return new Value(((Value)n).getValue() * 2);
		}

		return new Value(-100);
	}
}
