Example #1
0
        public ActionResult Exercise1()
        {
            Exercise.Models.Exercise1 exercise1 = new Models.Exercise1();

            Random rnd = new Random();
            exercise1.FlightsOfStairs = rnd.Next(1, 50);
            exercise1.Flight = new int[exercise1.FlightsOfStairs];

            for (var i = 0; i < exercise1.FlightsOfStairs; i++)
            {
                exercise1.FlightOfStairs = rnd.Next(5, 30);
                exercise1.Flight[i] = exercise1.FlightOfStairs;
            }

            exercise1.StepsPerStride = rnd.Next(2, 5);

            @ViewBag.StepsPerStride = exercise1.GetStrides();

            return View(exercise1);
        }
 public void TestInitialize()
 {
     exercise1 = new Models.Exercise1();
     exercise3 = new Models.Exercise3();
 }