예제 #1
0
        public async Task sendExerciseFeedback(string increment)
        {
            double incrementer = increment == "-1" ? 0.02 : 0.01;

            exercises.updateDict(exercises.getById(exercises.getMax()).exercisesInWorkout[exercises.getById(exercises.getMax()).exercisesInWorkout.Count - 1], incrementer);
            Exercise newExercise = exercises.generateNewWorkout(difficulty.all);

            exercises.add(newExercise);
            await Clients.Caller.SendAsync("sendExercise", newExercise.exercisesInWorkout[0].exerciseName, newExercise.exercisesInWorkout[0].instructions);
        }
예제 #2
0
 public void OnGet()
 {
     currentExercise = exercises.generateNewWorkout(difficulty.all);
     exercises.add(currentExercise);
 }