Diffstat (limited to 'noncore/games/kcheckers/kcheckers.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/kcheckers/kcheckers.h | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/noncore/games/kcheckers/kcheckers.h b/noncore/games/kcheckers/kcheckers.h index e86524f..ccf5bae 100644 --- a/noncore/games/kcheckers/kcheckers.h +++ b/noncore/games/kcheckers/kcheckers.h @@ -7,53 +7,68 @@ #include "field.h" #include "checkers.h" -#define WOOD 1 -#define MARBLE 2 +#define WOODEN 1 +#define GREEN 2 +#define MARBLE 3 #define ENGLISH 11 #define RUSSIAN 12 #define BEGINNER 2 #define NOVICE 4 -#define AVERAGE 5 -#define GOOD 6 -#define EXPERT 7 -#define MASTER 8 +#define AVERAGE 6 +#define GOOD 7 +#define EXPERT 8 +#define MASTER 9 + +class QToolButton; class KCheckers:public QMainWindow { Q_OBJECT public: KCheckers(); + protected: + void closeEvent(QCloseEvent*); + private slots: + + void help(); void about(); void aboutQt(); void newGame(); - void click(int); // Processes the mouse clics on fields + void undoMove(); + void click(int); + void showNumeration(); void setSkillBeginner() {setSkill(BEGINNER);}; void setSkillNovice() {setSkill(NOVICE);}; void setSkillAverage() {setSkill(AVERAGE);}; void setSkillGood() {setSkill(GOOD);}; void setSkillExpert() {setSkill(EXPERT);}; void setSkillMaster() {setSkill(MASTER);}; - void setPatternWood() {setPattern(WOOD);}; + void setPatternWooden() {setPattern(WOODEN);}; + void setPatternGreen() {setPattern(GREEN);}; void setPatternMarble() {setPattern(MARBLE);}; void setRulesEnglish() {setRules(ENGLISH);}; void setRulesRussian() {setRules(RUSSIAN);}; private: + void compGo(); bool userGo(int); - void drawBoard(); + void drawBoard(int); + void drawNumeration(); void colorChange(); + void unselect(); + void readConfig(); void setSkill(int); void setRules(int); void setPattern(int); @@ -61,8 +76,13 @@ class KCheckers:public QMainWindow int from; // Selected by user int skill; int rules; int pattern; + + int numID; // Show Numeration + int undoID; // Undo Move + int undoBoard[32]; + bool gameOver; bool selected; bool userFirst; @@ -74,8 +94,11 @@ class KCheckers:public QMainWindow QImage* imageWood1; QImage* imageWood2; QImage* imageWood3; + QImage* imageGreen1; + QImage* imageGreen2; + QImage* imageGreen3; QImage* imageMarble1; QImage* imageMarble2; QImage* imageMarble3; @@ -84,12 +107,17 @@ class KCheckers:public QMainWindow QImage* imageKing1; QImage* imageKing2; Checkers* game; + QPopupMenu* gameMenu; QPopupMenu* skillMenu; QPopupMenu* optionsMenu; + QToolButton* undoButton; QLabel* statusLabel; + static QString enNumeration; + static QString ruNumeration; + static const int t[32]; // Translate table }; |