-rw-r--r-- | noncore/games/zsame/StoneField.cpp | 4 | ||||
-rw-r--r-- | noncore/games/zsame/StoneField.h | 3 | ||||
-rw-r--r-- | noncore/games/zsame/StoneWidget.cpp | 4 | ||||
-rw-r--r-- | noncore/games/zsame/StoneWidget.h | 1 | ||||
-rw-r--r-- | noncore/games/zsame/ZSameWidget.cpp | 1 |
5 files changed, 12 insertions, 1 deletions
diff --git a/noncore/games/zsame/StoneField.cpp b/noncore/games/zsame/StoneField.cpp index 49d8eca..56e9dc5 100644 --- a/noncore/games/zsame/StoneField.cpp +++ b/noncore/games/zsame/StoneField.cpp | |||
@@ -353,4 +353,8 @@ bool StoneField::gotBonus() const { | |||
353 | } | 353 | } |
354 | 354 | ||
355 | void StoneField::clearBonus() { | ||
356 | m_gotBonus = false; | ||
357 | } | ||
358 | |||
355 | int | 359 | int |
356 | StoneField::getBoard() const { | 360 | StoneField::getBoard() const { |
diff --git a/noncore/games/zsame/StoneField.h b/noncore/games/zsame/StoneField.h index 80be73a..d32d78d 100644 --- a/noncore/games/zsame/StoneField.h +++ b/noncore/games/zsame/StoneField.h | |||
@@ -92,6 +92,7 @@ public: | |||
92 | int undo(int count=1); | 92 | int undo(int count=1); |
93 | 93 | ||
94 | bool isGameover() const; | 94 | bool isGameover() const; |
95 | bool gotBonus() const; | 95 | bool gotBonus() const; |
96 | void clearBonus(); | ||
96 | bool undoPossible() const; | 97 | bool undoPossible() const; |
97 | int getBoard() const; | 98 | int getBoard() const; |
diff --git a/noncore/games/zsame/StoneWidget.cpp b/noncore/games/zsame/StoneWidget.cpp index 646fc9c..5dd0252 100644 --- a/noncore/games/zsame/StoneWidget.cpp +++ b/noncore/games/zsame/StoneWidget.cpp | |||
@@ -186,4 +186,8 @@ bool StoneWidget::hasBonus() { | |||
186 | } | 186 | } |
187 | 187 | ||
188 | void StoneWidget::clearBonus() { | ||
189 | stonefield.clearBonus(); | ||
190 | } | ||
191 | |||
188 | bool StoneWidget::isOriginalBoard() { | 192 | bool StoneWidget::isOriginalBoard() { |
189 | return !modified; | 193 | return !modified; |
diff --git a/noncore/games/zsame/StoneWidget.h b/noncore/games/zsame/StoneWidget.h index 9cd7e10..89a8afc 100644 --- a/noncore/games/zsame/StoneWidget.h +++ b/noncore/games/zsame/StoneWidget.h | |||
@@ -72,4 +72,5 @@ public: | |||
72 | // if isGameover(): finished with bonus? | 72 | // if isGameover(): finished with bonus? |
73 | bool hasBonus(); | 73 | bool hasBonus(); |
74 | void clearBonus(); | ||
74 | // test for unchanged start position | 75 | // test for unchanged start position |
75 | bool isOriginalBoard(); | 76 | bool isOriginalBoard(); |
diff --git a/noncore/games/zsame/ZSameWidget.cpp b/noncore/games/zsame/ZSameWidget.cpp index 04ad825..dee4a1c 100644 --- a/noncore/games/zsame/ZSameWidget.cpp +++ b/noncore/games/zsame/ZSameWidget.cpp | |||
@@ -219,4 +219,5 @@ void ZSameWidget::gameover() { | |||
219 | i18n("<qt>You even removed the last stone, great job! " | 219 | i18n("<qt>You even removed the last stone, great job! " |
220 | "This gave you a score of %1 in total.</qt>").arg(stone->score())); | 220 | "This gave you a score of %1 in total.</qt>").arg(stone->score())); |
221 | stone->clearBonus(); | ||
221 | } else { | 222 | } else { |
222 | QMessageBox::information(this,i18n("Game over"), | 223 | QMessageBox::information(this,i18n("Game over"), |