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();
}
}