src/main/java/ru/alphatech/icfpc/cards/Dbl.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 Dbl implements ICard
     8 public class Dbl extends AbstractCard
     9 {
     9 {
    10 	@Override
    10 	@Override
    11 	public String getName() {
    11 	public String getName() {
    12 		return "dbl";
    12 		return "dbl";
    13 	}
    13 	}
    14 	
    14 	
    15 	@Override
    15 	@Override
    16 	public IValue returnValue(IValue nobj, Player proponent, Player opponent)
    16 	public IValue returnValue(IValue nobj, Player proponent, Player opponent)
    17 	{
    17 	{
       
    18 		incAndTest();
       
    19 		
    18 		if(nobj instanceof Value)
    20 		if(nobj instanceof Value)
    19 		{
    21 		{
    20 			int n = ((Value)nobj).getValue();
    22 			int n = ((Value)nobj).getValue();
    21 			
    23 			
    22 			if(n >= 32767)
    24 			if(n >= 32767)