@Override
    public int takeStep()
    {
    	fillVariables();
    	
    	if (this.gloBallBehindLine(this.gloBall, this.gloMyPosition.x - (this.ourField * 0.4), ourField)) {
    		if (this.ourField * this.gloBall.x < 0.4) {
    			if (myRobotAPI.canKick()) {
    				myRobotAPI.kick();
    			} else {
    				myRobotAPI.passBall(gloOppSecondGoalPost);
    			}
    		} else if (this.ourField * (this.gloBall.x - 0.1) > this.gloMyPosition.x) {
    			myRobotAPI.setBehindBall(this.gloOppSecondGoalPost);
	    		myRobotAPI.passBall(this.gloOppSecondGoalPost);
	    	} else {
	    		myRobotAPI.setSteerHeading(this.egoOppFirstGoalPost.t);
	    		myRobotAPI.setSpeed(1);
	    	}
    	} else {
	    	if (upper) {
		    	if (gloBallBehindLine(this.gloBall, 0, this.ourField)) {
		    		goToGloDestination(this.gloMyPosition, gloUpperDefensePosition, 0.1);
		    	} else {
		    		goToGloDestination(this.gloMyPosition, gloUpperAttackPosition, 0.1);
		    	}
	    	} else {
	    		if (gloBallBehindLine(this.gloBall, 0, this.ourField)) {
		    		goToGloDestination(this.gloMyPosition, gloDownerDefensePosition, 0.1);
		    	} else {
		    		goToGloDestination(this.gloMyPosition, gloDownerAttackPosition, 0.1);
		    	}
	    	}
    	}
    	
    	return RobotAPI.ROBOT_OK;
    }