package ru.alphatech.icfpc.policy;

import ru.alphatech.icfpc.cards.Dbl;
import ru.alphatech.icfpc.cards.Succ;
import ru.alphatech.icfpc.cards.Zero;
import ru.alphatech.icfpc.game.Player;

public class VitalityBoostPolicy extends AbstractPolicy {
	
	public static final int turnsCount = 100;
	
	public VitalityBoostPolicy(int targetSlot, Player player) {
		super(turnsCount, player);
		this.targetSlot = targetSlot;
		
		maxValueSlotNum = player.getStatistic().maxValueSlotNum;
		maxValue = player.getStatistic().maxValue;
		firstIdentitySlot = -1;
	}
	
	protected int targetSlot = -1;
	protected int maxValueSlotNum = -1;
	protected int maxValue = -1;
	protected int firstIdentitySlot = -1;
	
	public boolean next() {
		if ( super.next() ){
			
			switch (getCurrentTurns()) {
				case 0:
					player.applySlotToCard(player.getSlot(firstIdentitySlot), );
				break;
				case 1:
				case 2:
					player.applyCardToSlot(new Succ(), player.getSlot(incValueSlotNum));
				break;
				case 3:
				case 4:
				case 5:
				case 6:
				case 7:
				case 8:
				case 9:
				case 10:
					player.applyCardToSlot(new Dbl(), player.getSlot(incValueSlotNum));
				break;
				case 11:
				break;
			}
			
		}
		return false;
	}

}
