equal
deleted
inserted
replaced
1 package ru.alphatech.icfpc.game; |
1 package ru.alphatech.icfpc.game; |
2 |
2 |
3 import ru.alphatech.icfpc.cards.I; |
3 import ru.alphatech.icfpc.cards.I; |
|
4 import ru.alphatech.icfpc.cards.ICard; |
|
5 import ru.alphatech.icfpc.cards.Zero; |
4 |
6 |
5 |
7 |
6 |
8 |
7 public class Player |
9 public class Player |
8 { |
10 { |
38 Run.setAutoMode(false); |
40 Run.setAutoMode(false); |
39 Run.resetCallCount(); |
41 Run.resetCallCount(); |
40 try{ |
42 try{ |
41 switch(batch.operationType){ |
43 switch(batch.operationType){ |
42 case CARD_TO_SLOT: |
44 case CARD_TO_SLOT: |
43 batch.card.returnValue(getSlot(batch.slot.getId()).getValue(), this, myOpponent); |
45 IValue value = getSlot(batch.slot.getId()).getValue(); |
|
46 |
|
47 if(value instanceof Zero) |
|
48 { |
|
49 value = new Value(0); |
|
50 } |
|
51 |
|
52 if(batch.card instanceof Zero) |
|
53 { |
|
54 batch.card = (ICard) new Value(0); |
|
55 } |
|
56 |
|
57 batch.card.returnValue(value, this, myOpponent); |
44 break; |
58 break; |
45 case SLOT_TO_CARD: |
59 case SLOT_TO_CARD: |
46 getSlot(batch.slot.getId()).getValue().returnValue(batch.card, this, myOpponent); |
60 getSlot(batch.slot.getId()).getValue().returnValue(batch.card, this, myOpponent); |
47 break; |
61 break; |
48 } |
62 } |