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/remoteundostatus/garagedoordowncommand.d

25 lines
407 B
D

module command.remoteundostatus.garagedoordowncommand;
import command.remoteundostatus.command;
import command.remoteundostatus.garagedoor;
class GarageDoorDownCommand : Command
{
GarageDoor garageDoor;
this(GarageDoor garageDoor)
{
this.garageDoor = garageDoor;
}
void execute()
{
garageDoor.down();
}
void undo()
{
garageDoor.up();
}
}