@Override
    public int takeStep()
    {
    	fillVariables();
    	
    	if (gloBallBehindLine(this.gloBall, -0.3, ourField)) {
    		if (upper) {
    			goToGloDestination(this.gloMyPosition, this.gloUpperDefensePosition, 0.1);
    			System.out.println("UPPER: " + this.gloUpperDefensePosition);
    		} else {
    			goToGloDestination(this.gloMyPosition, this.gloDownerDefensePosition, 0.1);
    			System.out.println("DOWNER: " + this.gloDownerDefensePosition);
    		}
    	} else if (gloBallBehindLine(this.gloBall, -0.1, ourField)){
    		myRobotAPI.setBehindBall(this.egoRandomGoal);
    	} else {
    		myRobotAPI.setSteerHeading(this.egoRandomGoal.t);
    		myRobotAPI.setSpeed(1);
    		if (myRobotAPI.canKick()) {
    			myRobotAPI.kick();
    		}
    	}
    	
    	if (myRobotAPI.blocked()) {
			MessageEvent message = new MessageEvent();
			message.setReceiver(0);
			message.setType(Type.trainer);
			message.setEventText("Delantero bloqueado");
			myRobotAPI.getTeamManager().sendMessage(message);
    	}

    	return RobotAPI.ROBOT_OK;
    }