Esempio n. 1
0
        public ExecutionContext(InstructionProgram program)
        {
            Program             = program;
            MutatedInstructions = new Instruction[program.Width, program.Height];
            MutatedExpressions  = new char?[program.Width, program.Height];
            Stack = new Stack <int>();

            IsRunning          = true;
            ExecutionDirection = ExecutionDirection.Right;
            InstructionPointer = new InstructionPointer(0, 0);
        }
Esempio n. 2
0
 public void AdvanceInstructionPointer()
 {
     InstructionPointer = InstructionPointer.CreateNext(ExecutionDirection, Program.Width, Program.Height);
 }