Resolve WES-133 "Multiple choice"

This commit is contained in:
Tibe Habils
2023-04-10 15:05:11 +00:00
committed by Jelle De Geest
parent 04d9a4bf2b
commit 4e9d801e61
49 changed files with 3310 additions and 1244 deletions

View File

@@ -113,6 +113,15 @@ public class User
storedUserData.courses.Add(progress);
}
/// <summary>
/// Reset progress of a course
/// </summary>
/// <param name="courseIndex">Index of course</param>
public void ResetCourseProgress(CourseIndex courseIndex)
{
storedUserData.courses.RemoveAll((p) => p.courseIndex == courseIndex);
}
/// <summary>
/// Get the progress of all minigames the user did
/// </summary>
@@ -140,4 +149,13 @@ public class User
{
storedUserData.minigames.Add(progress);
}
/// <summary>
/// Reset progress of a minigame
/// </summary>
/// <param name="minigameIndex">Index of the minigame</param>
public void ResetMinigameProgress(MinigameIndex minigameIndex)
{
storedUserData.minigames.RemoveAll((p) => p.minigameIndex == minigameIndex);
}
}