public RemoteControl() { numberOfSlots = 7; OnCommands = new Command[numberOfSlots]; OffCommands = new Command[numberOfSlots]; Command noCommand = new NoCommand(); for (int i = 0; i < numberOfSlots; i++) { OnCommands[i] = noCommand; OffCommands[i] = noCommand; } }
public RemoteControlWithUndo() { numberOfSlots = 7; onCommands = new ICommand[numberOfSlots]; offCommands = new ICommand[numberOfSlots]; ICommand noCommand = new NoCommand(); for (int i = 0; i < numberOfSlots; i++) { onCommands[i] = noCommand; offCommands[i] = noCommand; } undoCommand = noCommand; }