Questionable/Questionable.Model/V1/QuestSequence.cs

22 lines
477 B
C#
Raw Normal View History

2024-05-25 21:51:37 +00:00
using System.Collections.Generic;
2024-07-18 14:33:48 +00:00
using System.Linq;
2024-05-25 21:51:37 +00:00
namespace Questionable.Model.V1;
2024-06-14 09:37:33 +00:00
public sealed class QuestSequence
2024-05-25 21:51:37 +00:00
{
2024-06-14 09:37:33 +00:00
public int Sequence { get; set; }
2024-05-26 19:45:26 +00:00
public string? Comment { get; set; }
2024-05-25 21:51:37 +00:00
public List<QuestStep> Steps { get; set; } = new();
public QuestStep? FindStep(int step)
{
if (step < 0 || step >= Steps.Count)
return null;
return Steps[step];
}
2024-07-18 14:33:48 +00:00
public QuestStep? LastStep() => Steps.LastOrDefault();
2024-05-25 21:51:37 +00:00
}