using JetBrains.Annotations;
using Realms;

namespace EscapeRoomEngine.Engine.Runtime.Measurements
{
    /// <summary>
    /// The target and estimated time, along with the percentile since the last section, that will be stored in the database.
    /// </summary>
    public class PlanResult : EmbeddedObject
    {
        /// <summary>
        /// The target time set by the game master when this section ended.
        /// </summary>
        public float TargetTime { get; set; }
        /// <summary>
        /// The percentile of the current player during this section.
        /// </summary>
        public float SectionPercentile { get; set; }
        /// <summary>
        /// The estimated time to complete the whole puzzle plan when this section ended.
        /// </summary>
        public float TimeEstimation { get; set; }

        [UsedImplicitly]
        public PlanResult() {}
        public PlanResult(float targetTime, float sectionPercentile, float timeEstimation)
        {
            TargetTime = targetTime;
            SectionPercentile = sectionPercentile;
            TimeEstimation = timeEstimation;
        }
    }
}