Example #1
0
        public IEnumerable <string> Convert(int minutes)
        {
            var firstLine  = LineFormatter.Format(minutes / 5, 11, n => n % 3 == 0 ? (char)TimeConverter.Lamp.Red : (char)TimeConverter.Lamp.Yellow);
            var secondLine = LineFormatter.Format(minutes % 5, 4, n => (char)TimeConverter.Lamp.Yellow);

            return(new[] { firstLine, secondLine });
        }
Example #2
0
        public IEnumerable <string> Convert(int hours)
        {
            var firstLine  = LineFormatter.Format(hours / 5, 4, n => (char)TimeConverter.Lamp.Red);
            var secondLine = LineFormatter.Format(hours % 5, 4, n => (char)TimeConverter.Lamp.Red);

            return(new[] { firstLine, secondLine });
        }
Example #3
0
        public IEnumerable <string> Convert(int seconds)
        {
            var line = LineFormatter.Format(1, 1, n => seconds % 2 == 0 ? (char)TimeConverter.Lamp.Yellow : (char)TimeConverter.Lamp.Off);

            return(new[] { line });
        }