patterns/command/remoteundostatus/garagedoordowncommand.d

25 lines
407 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
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();
}
}