public void Test1() { var d = new Dance(5, "s1,x3/4,pe/b"); var s = Stopwatch.StartNew(); d.Execute(); s.Stop(); System.Console.WriteLine(s.Elapsed); Assert.AreEqual("baedc", d.CurrentState); s.Reset(); s.Start(); d.Execute(); s.Stop(); System.Console.WriteLine(s.Elapsed); Assert.AreEqual("ceadb", d.CurrentState); }
static void Main(string[] args) { var input = File.ReadAllText("input.txt"); var foundValues = new List <string>(); Dance dance = new Dance(16, input); var s = Stopwatch.StartNew(); var bla = (1_000_000_000 % 59); for (long i = 0; i < 120; i++) { dance.Execute(); Console.WriteLine($"{i,-3} {dance.CurrentState}"); } Console.WriteLine(dance.CurrentState); dance.Execute(); Console.WriteLine(dance.CurrentState); Console.Read(); }