43 lines
731 B
C++
43 lines
731 B
C++
#include "Player.h"
|
|
|
|
|
|
Player::Player() {
|
|
// default settings
|
|
this->DAS = 15; // 250ms
|
|
this->ARR = 3; // 50ms
|
|
this->SDR = 2; // 33ms
|
|
}
|
|
|
|
bool Player::setDAS(int DAS) {
|
|
if (DAS < DAS_MIN_VALUE || DAS > DAS_MAX_VALUE) return false;
|
|
|
|
this->DAS = DAS;
|
|
return true;
|
|
}
|
|
|
|
bool Player::setARR(int ARR) {
|
|
if (ARR < ARR_MIN_VALUE || ARR > ARR_MAX_VALUE) return false;
|
|
|
|
this->ARR = ARR;
|
|
return true;
|
|
}
|
|
|
|
bool Player::setSDR(int SDR) {
|
|
if (SDR < SDR_MIN_VALUE || SDR > SDR_MAX_VALUE) return false;
|
|
|
|
this->SDR = SDR;
|
|
return true;
|
|
}
|
|
|
|
int Player::getDAS() const {
|
|
return this->DAS;
|
|
}
|
|
|
|
int Player::getARR() const {
|
|
return this->ARR;
|
|
}
|
|
|
|
int Player::getSDR() const {
|
|
return this->SDR;
|
|
}
|