From 4cb7ca42003c177e3acc80075d7594e555966106 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 16:37:02 +0200 Subject: fix command design pattern --- TimeTravelCommand.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'TimeTravelCommand.h') diff --git a/TimeTravelCommand.h b/TimeTravelCommand.h index 7803134..359e63e 100644 --- a/TimeTravelCommand.h +++ b/TimeTravelCommand.h @@ -2,11 +2,17 @@ #include "Command.h" +class Museum; + class TimeTravelCommand : public Command { - using Command::Command; +public: + TimeTravelCommand(Museum & m, bool forwards = false); public: - virtual void forwards(); - virtual void backwards(); + virtual void execute(); + +private: + Museum & museum; + bool forwards; }; -- cgit v1.2.3