예제 #1
0
 private static string CreateExercise(RandomNumberGenerator randomNumberGenerator)
 {
     var ed = new ExerciseDefinition("", new ExerciseTemplate("{0} + {1} = "));
     ed.AddNumberDefinition(new NumberDefinition("", 0, 100));
     ed.AddNumberDefinition(new NumberDefinition("", 0, 100));
     return ed.CreateExercise(randomNumberGenerator);
 }
예제 #2
0
        public IEnumerable<string> Generate()
        {
            var exercises = new List<string>();
            var randomNumberGenerator = new RandomNumberGenerator();

            for (var i = 0; i < 25; i++)
            {
                exercises.Add(CreateExercise(randomNumberGenerator));
            }

            return exercises;
        }