src/main/java/ru/alphatech/icfpc/cards/Inc.java
changeset 79 0bfd181c663e
parent 74 b277f6c31f5f
child 102 cc814352ab43
equal deleted inserted replaced
78:7eacf1e21213 79:0bfd181c663e
     1 package ru.alphatech.icfpc.cards;
     1 package ru.alphatech.icfpc.cards;
     2 
     2 
     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.Run;
     6 import ru.alphatech.icfpc.game.Value;
     7 import ru.alphatech.icfpc.game.Value;
     7 
     8 
     8 public class Inc implements ICard
     9 public class Inc implements ICard
     9 {
    10 {
    10 	@Override
    11 	@Override
    21 
    22 
    22 			if (i >= 0 && i <= 255)
    23 			if (i >= 0 && i <= 255)
    23 			{
    24 			{
    24 				int v = proponent.getSlot(i).getVitality();
    25 				int v = proponent.getSlot(i).getVitality();
    25 				
    26 				
    26 				if (v > 0 && v < 65535)
    27 				if(Run.getAutoMode())
    27 				{
    28 				{
    28 					proponent.getSlot(i).setVitality(v + 1);
    29 					if(v > 0)
       
    30 					{
       
    31 						proponent.getSlot(i).setVitality(v - 1);
       
    32 					}
       
    33 				}
       
    34 				else
       
    35 				{
       
    36 					if (v > 0 && v < 65535)
       
    37 					{
       
    38 						proponent.getSlot(i).setVitality(v + 1);
       
    39 					}
    29 				}
    40 				}
    30 				
    41 				
    31 				return new I();
    42 				return new I();
    32 			}
    43 			}
    33 			else
    44 			else