mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-02-22 06:28:59 +00:00
37 lines
870 B
C#
37 lines
870 B
C#
namespace M6502.HarteTest
|
|
{
|
|
public class Test
|
|
{
|
|
public string? Name { get; set; }
|
|
|
|
public State? Initial { get; set; }
|
|
|
|
public State? Final { get; set; }
|
|
|
|
public List<List<object>>? Cycles { get; set; }
|
|
|
|
public IEnumerable<Cycle> AvailableCycles()
|
|
{
|
|
if (this.Cycles == null)
|
|
{
|
|
throw new InvalidOperationException("Cycles have not been initialised");
|
|
}
|
|
|
|
foreach (var cycle in this.Cycles)
|
|
{
|
|
yield return new Cycle(cycle);
|
|
}
|
|
}
|
|
|
|
public Cycle CycleAt(int index)
|
|
{
|
|
if (this.Cycles == null)
|
|
{
|
|
throw new InvalidOperationException("Cycles have not been initialised");
|
|
}
|
|
|
|
return new Cycle(this.Cycles[index]);
|
|
}
|
|
}
|
|
}
|