This repository has been archived on 2022-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
patterns/command/remoteundo/ceilingfanoncommand.d

25 lines
386 B
D

module command.remoteundo.ceilingfanoncommand;
import command.remoteundo.command;
import command.remoteundo.ceilingfan;
class CeilingFanOnCommand : Command
{
CeilingFan ceilingFan;
this(CeilingFan ceilingFan)
{
this.ceilingFan = ceilingFan;
}
void execute()
{
ceilingFan.high();
}
void undo()
{
ceilingFan.off();
}
}