string GetRowWithLamps(int count, int totalLampsInRow, LampState lampOnState, IRowConverter rowConverter = null) { Debug.Assert(count <= totalLampsInRow); Debug.Assert(lampOnState != LampState.Off); var row = new string((char)lampOnState, count); if (rowConverter != null) { row = rowConverter.Convert(row); } row = row.PadRight(totalLampsInRow, (char)LampState.Off); return(row); }
public string Print(TimeSpan time) { var lights = _rowConverter.Convert(time); return(_rowPrinter.Print(lights)); }