patterns/command/remoteundo/garagedoordowncommand.d

25 lines
389 B
D

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