// Path: src/game/Agent.java
// public static enum TurnState {
// 	Ready,	//ready to move
// 	Moved,	//moved
// 	Done,	//used ability
// }
// 
// Path: src/game/DataBattle.java
// public static enum TileOverlay {
// 	None,	//no overlay
// 	Neg,	//red -		(neg)ative stuff
// 	Pos,	//blue -	(pos)itive stuff
// 	Mod,	//green - 	(mod)ification to the tile
// 	Sel,	//white - 	(sel)ection
// 	Move,	//box -		This is in movement range
// 	MoveTo,	//arrow -	(move to) here
// 	MoveToNorth,
// 	MoveToSouth,
// 	MoveToEast,
// 	MoveToWest
// }


import util.*;
import game.Agent.TurnState;
import game.DataBattle.TileOverlay;
import java.util.LinkedList;
package game;



public class AIAction {
	private abstract class IAction {
		public IAction(int steps) {
			mStepsLeft = steps;
		}
		public void act(Agent a) {
			onAct(a);
			mStepsLeft--;
		}
		public abstract void onAct(Agent a);
		public boolean done() {
			return mStepsLeft == 0;
		}
		public int getStep() {
			return mStepsLeft;
		}
		private int mStepsLeft;
	}
	
	public void addSelect() {
		mActions.addLast(new IAction(10) {
			public void onAct(Agent a) {
				if (getStep() == 10) {
					a.getBoard().clear(true, true, true);
					//for (Vec v : mMoves)
					//	a.getBoard().getTile(v).Overlay = TileOverlay.Mod;
// Path: src/game/Agent.java
// public static enum TurnState {
// 	Ready,	//ready to move
// 	Moved,	//moved
// 	Done,	//used ability
// }
// 
// Path: src/game/DataBattle.java
// public static enum TileOverlay {
// 	None,	//no overlay
// 	Neg,	//red -		(neg)ative stuff
// 	Pos,	//blue -	(pos)itive stuff
// 	Mod,	//green - 	(mod)ification to the tile
// 	Sel,	//white - 	(sel)ection
// 	Move,	//box -		This is in movement range
// 	MoveTo,	//arrow -	(move to) here
// 	MoveToNorth,
// 	MoveToSouth,
// 	MoveToEast,
// 	MoveToWest
// }


// Path: src/game/AIAction.java
import util.*;
import game.Agent.TurnState;
import game.DataBattle.TileOverlay;
import java.util.LinkedList;

package game;



public class AIAction {
	private abstract class IAction {
		public IAction(int steps) {
			mStepsLeft = steps;
		}
		public void act(Agent a) {
			onAct(a);
			mStepsLeft--;
		}
		public abstract void onAct(Agent a);
		public boolean done() {
			return mStepsLeft == 0;
		}
		public int getStep() {
			return mStepsLeft;
		}
		private int mStepsLeft;
	}
	
	public void addSelect() {
		mActions.addLast(new IAction(10) {
			public void onAct(Agent a) {
				if (getStep() == 10) {
					a.getBoard().clear(true, true, true);
					//for (Vec v : mMoves)
					//	a.getBoard().getTile(v).Overlay = TileOverlay.Mod;
					a.getBoard().getTile(a.getPos()).Overlay = TileOverlay.Sel;