aboutsummaryrefslogtreecommitdiff
path: root/ToggleMuseumPauseCommand.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 16:37:02 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 16:37:02 +0200
commit4cb7ca42003c177e3acc80075d7594e555966106 (patch)
treed2f5836d70a1fa2dc1d18c4fb59f1bf1f2f91f5a /ToggleMuseumPauseCommand.h
parentd8289105193707daede1a5b59137f18e20f20aeb (diff)
fix command design pattern
Diffstat (limited to 'ToggleMuseumPauseCommand.h')
-rw-r--r--ToggleMuseumPauseCommand.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/ToggleMuseumPauseCommand.h b/ToggleMuseumPauseCommand.h
index 15d1388..40e0b24 100644
--- a/ToggleMuseumPauseCommand.h
+++ b/ToggleMuseumPauseCommand.h
@@ -2,11 +2,19 @@
#include "Command.h"
+class Museum;
+
class ToggleMuseumPauseCommand : public Command {
- using Command::Command;
+public:
+ ToggleMuseumPauseCommand(Museum & m);
+ ToggleMuseumPauseCommand(Museum & m, bool set);
public:
- virtual void toggle();
- virtual void set(bool paused);
+ virtual void execute();
+
+private:
+ Museum & museum;
+ bool toggle = true;
+ bool value;
};