#include "ToggleMuseumPauseCommand.h" #include "Museum.h" ToggleMuseumPauseCommand::ToggleMuseumPauseCommand(Museum & m) : museum(m) { this->toggle = true; } ToggleMuseumPauseCommand::ToggleMuseumPauseCommand(Museum & m, bool set) : museum(m) { this->toggle = false; this->value = set; } void ToggleMuseumPauseCommand::execute() { if (this->toggle) this->value = !this->museum.get_pause(); this->museum.set_pause(this->value); }