author | leseb <leseb> | 2002-06-11 16:25:06 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-06-11 16:25:06 (UTC) |
commit | 2cfbb2adc058b59140a14ba6bbfc057266fea0b8 (patch) (side-by-side diff) | |
tree | 2dc8756a9d691cdfb46b537955453f46171ceeff /noncore/games/kcheckers/kcheckers.h | |
parent | d709dd35dc07d4a204380354f00a89ceb4d1f845 (diff) | |
download | opie-2cfbb2adc058b59140a14ba6bbfc057266fea0b8.zip opie-2cfbb2adc058b59140a14ba6bbfc057266fea0b8.tar.gz opie-2cfbb2adc058b59140a14ba6bbfc057266fea0b8.tar.bz2 |
Version 0.3 port
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 @@ -9,6 +9,7 @@ #include "checkers.h" -#define WOOD 1 -#define MARBLE 2 +#define WOODEN 1 +#define GREEN 2 +#define MARBLE 3 #define ENGLISH 11 @@ -17,8 +18,10 @@ #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; @@ -29,9 +32,16 @@ class KCheckers:public QMainWindow 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);}; @@ -42,5 +52,6 @@ class KCheckers:public QMainWindow void setSkillMaster() {setSkill(MASTER);}; - void setPatternWood() {setPattern(WOOD);}; + void setPatternWooden() {setPattern(WOODEN);}; + void setPatternGreen() {setPattern(GREEN);}; void setPatternMarble() {setPattern(MARBLE);}; @@ -49,9 +60,13 @@ class KCheckers:public QMainWindow private: + void compGo(); bool userGo(int); - void drawBoard(); + void drawBoard(int); + void drawNumeration(); void colorChange(); + void unselect(); + void readConfig(); void setSkill(int); @@ -63,4 +78,9 @@ class KCheckers:public QMainWindow int rules; int pattern; + + int numID; // Show Numeration + int undoID; // Undo Move + int undoBoard[32]; + bool gameOver; bool selected; @@ -76,4 +96,7 @@ class KCheckers:public QMainWindow QImage* imageWood2; QImage* imageWood3; + QImage* imageGreen1; + QImage* imageGreen2; + QImage* imageGreen3; QImage* imageMarble1; QImage* imageMarble2; @@ -86,8 +109,13 @@ class KCheckers:public QMainWindow 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 |