namespace part1; class Program { struct Draw_Results { public int Red, Green, Blue; } static void Main(string[] args) { Dictionary> GameData = new(); // Load the list with game data StreamReader sr = new StreamReader("input"); string line = sr.ReadLine(); while (line != null) { string gameStartString = "Game "; string gameStopString = ":"; int gameStart = line.IndexOf(gameStartString) + gameStartString.Length; int gameStop = line.IndexOf(":"); int gameNumber = Int32.Parse(line.Substring(gameStart, gameStop - gameStart)); List results = []; string[] colors = ["red,", "green,", "blue,"]; int oldDelimiterLocation = 0; List games = []; string processedLine = line.Substring(gameStop + 1); int delimiterLocation = processedLine.IndexOf(";"); while(delimiterLocation != -1) { games.Add(processedLine[..delimiterLocation]); processedLine = processedLine.Substring(delimiterLocation + 2); delimiterLocation = processedLine.IndexOf(";"); } line = sr.ReadLine(); } //close the file sr.Close(); } }