src/main/java/ru/alphatech/icfpc/cards/Revive.java
changeset 102 cc814352ab43
parent 74 b277f6c31f5f
equal deleted inserted replaced
98:19dba9e387ce 102:cc814352ab43
     3 import ru.alphatech.icfpc.game.ICFPCException;
     3 import ru.alphatech.icfpc.game.ICFPCException;
     4 import ru.alphatech.icfpc.game.IValue;
     4 import ru.alphatech.icfpc.game.IValue;
     5 import ru.alphatech.icfpc.game.Player;
     5 import ru.alphatech.icfpc.game.Player;
     6 import ru.alphatech.icfpc.game.Value;
     6 import ru.alphatech.icfpc.game.Value;
     7 
     7 
     8 public class Revive implements ICard
     8 public class Revive extends AbstractCard
     9 {
     9 {
    10 	@Override
    10 	@Override
    11 	public String getName() {
    11 	public String getName() {
    12 		return "revive";
    12 		return "revive";
    13 	}
    13 	}
    14 	
    14 	
    15 	@Override
    15 	@Override
    16 	public IValue returnValue(IValue iobj, Player proponent, Player opponent)
    16 	public IValue returnValue(IValue iobj, Player proponent, Player opponent)
    17 	{
    17 	{
       
    18 		incAndTest();
       
    19 		
    18 		if (iobj instanceof Value)
    20 		if (iobj instanceof Value)
    19 		{
    21 		{
    20 			int i = ((Value)iobj).getValue();
    22 			int i = ((Value)iobj).getValue();
    21 
    23 
    22 			if (i >= 0 && i <= 255)
    24 			if (i >= 0 && i <= 255)