protected double Increase(SeatNames seatName, double step) { if (this.coefficientByPositions[seatName] < 1.0) { // reset this.coefficientByPositions[seatName] = 1.0; } this.coefficientByPositions[seatName] += step; return(this.coefficientByPositions[seatName]); }
protected double Decrease(SeatNames seatName, double step) { if (this.coefficientByPositions[seatName] > 1.0) { // reset this.coefficientByPositions[seatName] = 1.0; } this.coefficientByPositions[seatName] -= step; if (this.coefficientByPositions[seatName] < 0) { this.coefficientByPositions[seatName] = 0; } return(this.coefficientByPositions[seatName]); }