예제 #1
0
        public override void Initialize()
        {
            base.Initialize();

            computer = new IntComputer(lines);
            computer.Load();
            computer.Run();

            viewData = new Dictionary <IntVector2, int>();

            IntVector2 origin = new IntVector2(0, 0);

            while (computer.HasOutputs())
            {
                int output = (int)computer.GetOutput();

                if (output == 10)
                {
                    origin.X = 0;
                    origin.Y++;
                    continue;
                }

                viewData.Add(new IntVector2(origin.X, origin.Y), output);

                origin.X++;
            }
        }
예제 #2
0
 public bool IsFinished()
 {
     return computer.HasOutputs() == false;
 }