/* STEFFIS EIGENER AGENT
 * NICHT ANFASSEN!!!
 */
package agents;

import gameObjects.Player;
import knowledgeAndTechnics.NoFreePlayerException;

/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Steffi extends Agent {
	public void playerInitialization(){
		baseFunctions.init(infoPool.getTeamName());
		
		//Die Startposition
		infoPool.setXPlayerStart(-25);
		infoPool.setYPlayerStart(10);
		
		// Die Ruheposition
		infoPool.setXPlayerHome(-25);
		infoPool.setYPlayerHome(10);
		// Der Handlungsbereich
		infoPool.setX1PlayerActingField(-52.5);
		infoPool.setY1PlayerActingField(-34);
		infoPool.setX2PlayerActingField(52.5);
		infoPool.setY2PlayerActingField(34);
		// weitere Variablen
		infoPool.setX1PlayerFreeKickField(-52.5);
		infoPool.setY1PlayerFreeKickField(-34);
		infoPool.setX2PlayerFreeKickField(52.5);
		infoPool.setY2PlayerFreeKickField(34);
	}
	
	public Steffi(String[] args){
		super(args);
	}
	
	public void handlePlayOn(){
	    infoPool.resetLastKickTime();	    
	    try{
	        Player freePlayer = infoPool.findFreePlayer();
	        infoPool.interceptBall();
	        infoPool.passToFreePlayer(freePlayer);
		} catch (NoFreePlayerException e){
		    //TODO:NoFreePlayerException behandeln! 
		};
		
	}
	
	
	public static void main(String[] args) {
		Steffi s = new Steffi(args);
		s.start();
	}
}
