small fixes

This commit is contained in:
2023-03-22 07:54:00 +01:00
parent 307edb8491
commit 9c65d24685
481 changed files with 2432 additions and 33 deletions

View File

@@ -88,7 +88,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// Create a new puzzle for a specific description and store it in the database.
/// </summary>
/// <remarks>This requires that the puzzle does not yet exist in the database.</remarks>
private Puzzle New(PuzzleModuleDescription puzzle)
public Puzzle New(PuzzleModuleDescription puzzle)
{
Puzzle created = null;
@@ -100,7 +100,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// <summary>
/// Load a specific puzzle from the database or create it if it wasn't found.
/// </summary>
private Puzzle LoadOrNew(PuzzleModuleDescription puzzle) => _realm.Find<Puzzle>(puzzle.Id) ?? New(puzzle);
public Puzzle LoadOrNew(PuzzleModuleDescription puzzle) => _realm.Find<Puzzle>(puzzle.Id) ?? New(puzzle);
/// <summary>
/// Load a specific puzzle from the database.
@@ -136,9 +136,10 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
session.PuzzlesSolved.Add(found);
// add plan result to session
var percentile = found.Distribution.Cumulative(measurement.Time);
session.PlanResults.Add(new PlanResult(
GameControl.Instance.TargetTime,
found.Distribution.Cumulative(measurement.Time),
percentile,
GameControl.Instance.EstimatedTime));
});
}