initial commit
This commit is contained in:
48
src/Core/Player.h
Normal file
48
src/Core/Player.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
/**
|
||||
* The controls of a player
|
||||
*/
|
||||
class Player {
|
||||
private:
|
||||
int DAS; // Delayed Auto-Shift, goes from 0 (instant) to 30 (500ms)
|
||||
int ARR; // Auto-Repeat Rate, goes from 0 (instant) to 30 (500ms)
|
||||
int SDR; // Soft Drop Rate, goes from 0 (instant) to 6 (100ms)
|
||||
|
||||
public:
|
||||
/**
|
||||
* Sets default controls
|
||||
*/
|
||||
Player();
|
||||
|
||||
/**
|
||||
* Try setting DAS to the desired value, and returns wheter it is possible
|
||||
*/
|
||||
bool setDAS(int DAS);
|
||||
|
||||
/**
|
||||
* Try setting ARR to the desired value, and returns wheter it is possible
|
||||
*/
|
||||
bool setARR(int ARR);
|
||||
|
||||
/**
|
||||
* Try setting SDR to the desired value, and returns wheter it is possible
|
||||
*/
|
||||
bool setSDR(int SDR);
|
||||
|
||||
/**
|
||||
* Returns DAS value
|
||||
*/
|
||||
int getDAS();
|
||||
|
||||
/**
|
||||
* Returns ARR value
|
||||
*/
|
||||
int getARR();
|
||||
|
||||
/**
|
||||
* Returns SDR value
|
||||
*/
|
||||
int getSDR();
|
||||
};
|
||||
Reference in New Issue
Block a user