patterns/command/remoteundostatusmacro/stereooffcommand.d

27 lines
431 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
module command.remoteundostatusmacro.stereooffcommand;
import command.remoteundostatusmacro.command;
import command.remoteundostatusmacro.stereo;
class StereoOffCommand : Command
{
Stereo stereo;
this(Stereo stereo)
{
this.stereo = stereo;
}
void execute()
{
stereo.off();
}
void undo()
{
stereo.on();
stereo.setCD();
stereo.setVolume(11);
}
}