src/main/java/ru/alphatech/icfpc/game/Player.java
changeset 110 d6c063577f0d
parent 106 643b85a8a16b
child 122 845c89fa268e
     1.1 --- a/src/main/java/ru/alphatech/icfpc/game/Player.java	Sun Jun 19 20:22:02 2011 +0400
     1.2 +++ b/src/main/java/ru/alphatech/icfpc/game/Player.java	Sun Jun 19 20:48:53 2011 +0400
     1.3 @@ -1,6 +1,8 @@
     1.4  package ru.alphatech.icfpc.game;
     1.5  
     1.6  import ru.alphatech.icfpc.cards.I;
     1.7 +import ru.alphatech.icfpc.cards.ICard;
     1.8 +import ru.alphatech.icfpc.cards.Zero;
     1.9  
    1.10  
    1.11  
    1.12 @@ -40,7 +42,19 @@
    1.13  		try{
    1.14  			switch(batch.operationType){
    1.15  			case CARD_TO_SLOT:
    1.16 -				batch.card.returnValue(getSlot(batch.slot.getId()).getValue(), this, myOpponent);
    1.17 +				IValue value = getSlot(batch.slot.getId()).getValue();
    1.18 +				
    1.19 +				if(value instanceof Zero)
    1.20 +				{
    1.21 +					value = new Value(0);
    1.22 +				}
    1.23 +				
    1.24 +				if(batch.card instanceof Zero)
    1.25 +				{
    1.26 +					batch.card = (ICard) new Value(0);
    1.27 +				}
    1.28 +
    1.29 +				batch.card.returnValue(value, this, myOpponent);
    1.30  				break;
    1.31  			case SLOT_TO_CARD:
    1.32  				getSlot(batch.slot.getId()).getValue().returnValue(batch.card, this, myOpponent);