*
authorindvdum
Sun, 19 Jun 2011 21:17:39 +0400
changeset 11337b0c40c07e9
parent 112 d1b74db1d349
child 114 56ba7b1ef026
*
src/main/java/ru/alphatech/icfpc/game/strategy/YetAnotherStrategy.java
     1.1 --- a/src/main/java/ru/alphatech/icfpc/game/strategy/YetAnotherStrategy.java	Sun Jun 19 21:15:49 2011 +0400
     1.2 +++ b/src/main/java/ru/alphatech/icfpc/game/strategy/YetAnotherStrategy.java	Sun Jun 19 21:17:39 2011 +0400
     1.3 @@ -31,11 +31,9 @@
     1.4  
     1.5  	@Override
     1.6  	public Batch move(Player proponent, Player opponent) {
     1.7 -		if(lastAttackedSlot > 254)
     1.8 -			lastAttackedSlot = lastAttackedDefaultSlot;
     1.9 -		if(lastUsedSlot > 254)
    1.10 -			lastUsedSlot = lastUsedDefaultSlot;
    1.11  		if(opponent.getSlot(lastAttackedSlot-1).getVitality() <= 0){
    1.12 +			if(lastAttackedSlot > 254)
    1.13 +				lastAttackedSlot = lastAttackedDefaultSlot;
    1.14  			batches.clear();
    1.15  			attackPolicy = new AttackHelpPolicy(AttackHelpPolicy.TYPE.ATTACK, 5, 6, lastAttackedSlot++, 10000, false);
    1.16  			callAttack = new CallExpressionPolicy(9, 5, 0, true);
    1.17 @@ -44,6 +42,8 @@
    1.18  		}
    1.19  		if(!batches.isEmpty())
    1.20  			return batches.poll();
    1.21 +		if(lastUsedSlot > 254)
    1.22 +			lastUsedSlot = lastUsedDefaultSlot;
    1.23  		AttackHelpPolicy helpPolicy = new AttackHelpPolicy(AttackHelpPolicy.TYPE.HELP, lastUsedSlot++, 8, 6, 5000, true);
    1.24  		batches.addAll(helpPolicy.getBatches());
    1.25  		batches.addAll(callAttack.getBatches());