patterns/command/remoteundostatus/garagedoorupcommand.d

25 lines
403 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
module command.remoteundostatus.garagedoorupcommand;
import command.remoteundostatus.command;
import command.remoteundostatus.garagedoor;
class GarageDoorUpCommand : Command
{
GarageDoor garageDoor;
this(GarageDoor garageDoor)
{
this.garageDoor = garageDoor;
}
void execute()
{
garageDoor.up();
}
void undo()
{
garageDoor.down();
}
}