This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
2007-02-23 18:10:32 +01:00
|
|
|
#ifndef _SETTINGS_H_
|
|
|
|
#define _SETTINGS_H_
|
|
|
|
|
|
|
|
struct point
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum type
|
|
|
|
{
|
|
|
|
BLACK = 0, WHITE, BOARD ,
|
|
|
|
NUMVALS
|
|
|
|
};
|
|
|
|
|
|
|
|
class Settings
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
Settings( void );
|
2007-02-23 23:28:29 +01:00
|
|
|
point getUL( void ) { return ul; }
|
|
|
|
point getUR( void ) { return ur; }
|
|
|
|
point getBL( void ) { return bl; }
|
|
|
|
point getBR( void ) { return br; }
|
|
|
|
void setUL( point p ) { ul = p; }
|
|
|
|
void setUR( point p ) { ur = p; }
|
|
|
|
void setBL( point p ) { bl = p; }
|
|
|
|
void setBR( point p ) { br = p; }
|
|
|
|
|
|
|
|
int getWhiteTreshold( void ) { return colorThreshold[WHITE]; }
|
|
|
|
int getBlackTreshold( void ) { return colorThreshold[BLACK]; }
|
|
|
|
|
|
|
|
void setWhiteThreshold( int t) { colorThreshold[WHITE] = t; }
|
|
|
|
void setBlackThreshold( int t) { colorThreshold[BLACK] = t; }
|
2007-02-23 18:10:32 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
//upper left, upper right etc...
|
|
|
|
point ul, ur, bl, br;
|
|
|
|
//threshold for white and black
|
|
|
|
int colorThreshold[2];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* ifndef _SETTINGS_H_ */
|