static void Main(string[] args) { int steps = 12172063; TuringMachine mach = new TuringMachine(steps); Console.WriteLine(mach.MakeSteps(steps)); }
private static void Main() { var instructions = File.ReadAllLines("Input.txt"); var turingMachine = new TuringMachine(instructions.ToList()); turingMachine.ExecuteBlueprint(); Console.WriteLine($"The diagnostic checksum is: {turingMachine.CalculateChecksum()}"); }
static void PartOne() { var machine = new TuringMachine(); for (int i = 0; i < 12_861_455; i++) { machine.Run(); if (i % 128614 == 0) { Console.WriteLine("Working..." + i / 128614 + "%"); } } Console.WriteLine(machine.GetTrueCount()); }
public string Run() { var config = new FixedConfiguration(); var machine = new TuringMachine(config); Console.WriteLine(machine); for (var i = 0; i < config.NumberOfRuns; i++) { machine.Step(); } return(machine.CalculateChecksum().ToString()); }