-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 @@ -354,2 +354,6 @@ bool StoneField::gotBonus() const { +void StoneField::clearBonus() { + m_gotBonus = false; +} + int 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 @@ -93,4 +93,5 @@ public: - bool isGameover() const; + bool isGameover() const; bool gotBonus() const; + void clearBonus(); bool undoPossible() 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 @@ -187,2 +187,6 @@ bool StoneWidget::hasBonus() { +void StoneWidget::clearBonus() { + stonefield.clearBonus(); +} + bool StoneWidget::isOriginalBoard() { 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 @@ -73,2 +73,3 @@ public: bool hasBonus(); + void clearBonus(); // test for unchanged start position 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 @@ -220,2 +220,3 @@ void ZSameWidget::gameover() { "This gave you a score of %1 in total.</qt>").arg(stone->score())); + stone->clearBonus(); } else { |