namespace AdventOfCode.Solutions._2023 { public class Day19(InputReader reader) : IChallange { private InputReader _inputReader = reader; public async Task GetSolutionPart1() { return string.Empty; } public async Task GetSolutionPart2() { return string.Empty; } } internal static InstructionSet ParseLine(string line) { string[] nameSplit = line.Split('{'); // build the instructions Instruction instruction = new(); for (int instructionIndex = 0; instructionIndex < nameSplit[1].Length - 1; instructionIndex++) { // first char is the Category instruction.Category = nameSplit[1][instructionIndex++]; // second char is the operator instruction.Operator = nameSplit[1][instructionIndex++]; // from third untill ':' is the compair value string comp = nameSplit[1].Substring(instructionIndex, nameSplit[1].IndexOf(':')); instruction.CompairValue = int.Parse(comp); instructionIndex += comp.Length + 1; // skip the : // if true value instruction.resultTrue = nameSplit[1].Substring(instructionIndex, nameSplit[1].IndexOf(',')); instructionIndex = instruction.resultTrue.Length + 1; // skip the , // if false value // check if the instructionIndex + 1 is an operator if (nameSplit[1][instructionIndex + 1] == '>' || nameSplit[1][instructionIndex + 1] == '<') { } } } internal class InstructionSet { public string Name { get; set; } //public string Process } internal class Instruction { public char Category; public char Operator; public int CompairValue; public string resultTrue; public string resultFalse; } }