38 lines
1 KiB
C++
38 lines
1 KiB
C++
//
|
|
// Created by camer on 20/05/2020.
|
|
//
|
|
|
|
#include "../include/TerrariumParameter.h"
|
|
//Constructor
|
|
TerrariumParameter::TerrariumParameter(int thresholdHigh, int thresholdLow) : thresholdHigh(thresholdHigh),
|
|
thresholdLow(thresholdLow){}
|
|
|
|
//Getters Setters
|
|
float TerrariumParameter::getValue() const {
|
|
return value;
|
|
}
|
|
void TerrariumParameter::setValue(float value) {
|
|
TerrariumParameter::value = value;
|
|
}
|
|
int TerrariumParameter::getThresholdHigh() const {
|
|
return thresholdHigh;
|
|
}
|
|
void TerrariumParameter::setThresholdHigh(int thresholdHigh) {
|
|
TerrariumParameter::thresholdHigh = thresholdHigh;
|
|
}
|
|
int TerrariumParameter::getThresholdLow() const {
|
|
return thresholdLow;
|
|
}
|
|
void TerrariumParameter::setThresholdLow(int thresholdLow) {
|
|
TerrariumParameter::thresholdLow = thresholdLow;
|
|
}
|
|
|
|
//Methods
|
|
bool TerrariumParameter::is2High() {
|
|
return this->value > this->thresholdHigh;
|
|
}
|
|
|
|
bool TerrariumParameter::is2Low() {
|
|
return this->value < this->thresholdLow;
|
|
}
|
|
|