| author | indvdum |
| Sat, 18 Jun 2011 19:46:50 +0400 | |
| changeset 24 | 7938ec9d4fe0 |
| parent 21 | b0748d485790 |
| child 32 | 04ac70718172 |
| permissions | -rw-r--r-- |
| akhmetovlz@19 | 1 |
package ru.alphatech.icfpc.policy; |
| akhmetovlz@19 | 2 |
|
| akhmetovlz@19 | 3 |
import ru.alphatech.icfpc.cards.Dbl; |
| akhmetovlz@19 | 4 |
import ru.alphatech.icfpc.cards.Succ; |
| akhmetovlz@19 | 5 |
import ru.alphatech.icfpc.cards.Zero; |
| akhmetovlz@19 | 6 |
import ru.alphatech.icfpc.game.Player; |
| akhmetovlz@19 | 7 |
|
| akhmetovlz@19 | 8 |
public class VitalityBoostPolicy extends AbstractPolicy {
|
| akhmetovlz@19 | 9 |
|
| akhmetovlz@19 | 10 |
public static final int turnsCount = 100; |
| akhmetovlz@19 | 11 |
|
| akhmetovlz@19 | 12 |
public VitalityBoostPolicy(int targetSlot, Player player) {
|
| akhmetovlz@19 | 13 |
super(turnsCount, player); |
| akhmetovlz@19 | 14 |
this.targetSlot = targetSlot; |
| akhmetovlz@19 | 15 |
|
| akhmetovlz@19 | 16 |
maxValueSlotNum = player.getStatistic().maxValueSlotNum; |
| akhmetovlz@19 | 17 |
maxValue = player.getStatistic().maxValue; |
| akhmetovlz@19 | 18 |
firstIdentitySlot = -1; |
| akhmetovlz@19 | 19 |
} |
| akhmetovlz@19 | 20 |
|
| akhmetovlz@19 | 21 |
protected int targetSlot = -1; |
| akhmetovlz@19 | 22 |
protected int maxValueSlotNum = -1; |
| akhmetovlz@19 | 23 |
protected int maxValue = -1; |
| akhmetovlz@19 | 24 |
protected int firstIdentitySlot = -1; |
| akhmetovlz@19 | 25 |
|
| akhmetovlz@19 | 26 |
public boolean next() {
|
| akhmetovlz@19 | 27 |
if ( super.next() ){
|
| akhmetovlz@19 | 28 |
|
| akhmetovlz@19 | 29 |
switch (getCurrentTurns()) {
|
| akhmetovlz@19 | 30 |
case 0: |
| akhmetovlz@19 | 31 |
break; |
| akhmetovlz@19 | 32 |
case 1: |
| akhmetovlz@19 | 33 |
case 2: |
| akhmetovlz@19 | 34 |
break; |
| akhmetovlz@19 | 35 |
case 3: |
| akhmetovlz@19 | 36 |
case 4: |
| akhmetovlz@19 | 37 |
case 5: |
| akhmetovlz@19 | 38 |
case 6: |
| akhmetovlz@19 | 39 |
case 7: |
| akhmetovlz@19 | 40 |
case 8: |
| akhmetovlz@19 | 41 |
case 9: |
| akhmetovlz@19 | 42 |
case 10: |
| akhmetovlz@19 | 43 |
break; |
| akhmetovlz@19 | 44 |
case 11: |
| akhmetovlz@19 | 45 |
break; |
| akhmetovlz@19 | 46 |
} |
| akhmetovlz@19 | 47 |
|
| akhmetovlz@19 | 48 |
} |
| akhmetovlz@19 | 49 |
return false; |
| akhmetovlz@19 | 50 |
} |
| akhmetovlz@19 | 51 |
|
| akhmetovlz@19 | 52 |
} |