public double evaluate(Robot robot){
		switch(type){
		case BARRELFB: 
			int valueFB = expression != null ? (int)expression.evaluate(robot) : 0;
			return robot.getBarrelFB(valueFB);
		case BARRELLR: 
			int valueLR = expression != null ? (int)expression.evaluate(robot) : 0;
			return robot.getBarrelLR(valueLR);
		case FUELLEFT: return robot.getFuel();
		case NUMBARRELS: return robot.numBarrels();
		case OPPFB: return robot.getOpponentFB();
		case OPPLR: return robot.getOpponentLR();
		case WALLDIST: return robot.getDistanceToWall();
		default: throw new ParserFailureException("Could not determine sensor type"); 
		}
	}