25 lines
347 B
D
25 lines
347 B
D
|
module command.remoteundostatus.lightoncommand;
|
||
|
|
||
|
import command.remoteundostatus.command;
|
||
|
import command.remoteundostatus.light;
|
||
|
|
||
|
class LightOnCommand : Command
|
||
|
{
|
||
|
Light light;
|
||
|
|
||
|
this(Light light)
|
||
|
{
|
||
|
this.light = light;
|
||
|
}
|
||
|
|
||
|
void execute()
|
||
|
{
|
||
|
light.on();
|
||
|
}
|
||
|
|
||
|
void undo()
|
||
|
{
|
||
|
light.off();
|
||
|
}
|
||
|
}
|