public void Ride(BikeAction action) { Console.WriteLine($"Bike is now doing action: {action}"); BikeCommand command = new BikeCommand(_bike, action); _commands.Push(command); command.DoAction(); Console.WriteLine(ToString()); }
public BikeCommand(IBike bike, BikeAction action) { _bike = bike; _action = action; }