protected override string SolvePartOne()
 {
     pc.Program[1] = 12;
     pc.Program[2] = 2;
     foreach (long _ in pc.RunProgram())
     {
     }
     return(pc.PreviousRunState[0].ToString());
 }
        protected override string SolvePartOne()
        {
            long lastItem = long.MinValue;

            cpu.ReadyInput(1);
            foreach (long item in cpu.RunProgram())
            {
                Console.WriteLine(item);
                lastItem = item;
            }
            return(lastItem.ToString());
        }
 private bool Scan(long x, long y)
 {
     bot.ClearInputs();
     bot.ReadyInput(x);
     bot.ReadyInput(y);
     return(bot.RunProgram().FirstOrDefault() == 1);
 }
        protected override string SolvePartOne()
        {
            Dictionary <(long x, long y), long> screen = new();
            var outputStream = cab.RunProgram().ToList();

            for (int i = 0; i < outputStream.Count; i += 3)
            {
                screen[(outputStream[i], outputStream[i + 1])] = outputStream[i + 2];
        protected override string SolvePartOne()
        {
            bot.ClearInputs();
            foreach (char c in "NOT A J\nNOT C T\nOR T J\nAND D J\nWALK\n")
            {
                bot.ReadyInput(c);
            }

            var output = bot.RunProgram().ToList();

            if (output.Count > 1)
            {
                foreach (var n in output)
                {
                    if (n < 255)
                    {
                        Write((char)n);
                    }
                }
            }
            return(output.Last().ToString());
        }
        protected override string SolvePartOne()
        {
            bot.ClearInputs();
            foreach (var c in bot.RunProgram(true))
            {
                if (c == long.MinValue)
                {
                    continue;
                }
                if (c == long.MaxValue)
                {
                    if (bot.Inputs.Count != 0)
                    {
                        continue;
                    }
                    string toBot = Console.ReadLine();
                    if (toBot == "EXIT")
                    {
                        break;
                    }
                    foreach (char c3 in toBot)
                    {
                        bot.ReadyInput(c3);
                    }
                    bot.ReadyInput('\n');
                    continue;
                }
                char c2 = (char)c;
                Write(c2);
                if (c2 == '?')
                {
                    continue;
                }
            }


            return("Check your console");
        }