float oldLevel = level;
    public float take(float amountRequested) {        float oldLevel = level;        //idiot check        if (amountRequested <= 0f) {            return 0f;        }        float takenAmount;        //asking for more stuff than exists        if (amountRequested > level) {            takenAmount = level;            level = 0f;        }        //stuff exists for request        else {            takenAmount = amountRequested;            level -= takenAmount;        }        return takenAmount;    }