Exemple #1
0
        public string convertTime(string aTime)
        {
            var hourTimeComponentAsInteger     = Convert.ToInt32(aTime);
            var howManyHourLightsOnInFirstRow  = hourTimeComponentAsInteger / 5;
            var hourLightsFirstRow             = GetLightsRow(howManyHourLightsOnInFirstRow);
            var howManyHourLightsOnInSecondRow = hourTimeComponentAsInteger % 5;
            var hourLightsSecondRow            = GetLightsRow(howManyHourLightsOnInSecondRow);

            return(_merger.Merge(new String[2] {
                hourLightsFirstRow, hourLightsSecondRow
            }));
        }
Exemple #2
0
        public string convertTime(string aTime)
        {
            var minutesTimeComponentAsInteger     = Convert.ToInt32(aTime);
            var howManyMinutesLightsOnInFirstRow  = minutesTimeComponentAsInteger / 5;
            var minutesLightsInFirstRow           = GetLightsInFirstRow(howManyMinutesLightsOnInFirstRow);
            var howManyminutesLightsOnInSecondRow = minutesTimeComponentAsInteger % 5;
            var minutesLightsInSecondRow          = GetLightsInSecondRow(howManyminutesLightsOnInSecondRow);

            return(_merger.Merge(new String[2] {
                minutesLightsInFirstRow, minutesLightsInSecondRow
            }));
        }