#include "ControlBooleanCommand.h" ControlBooleanCommand::ControlBooleanCommand(bool & t) : target(t) { this->toggle = true; } ControlBooleanCommand::ControlBooleanCommand(bool & t, bool set) : target(t) { this->toggle = false; this->value = set; } void ControlBooleanCommand::execute() { if (this->toggle) this->value = !this->target; this->target = this->value; }