Пример #1
0
        //  threaded implementation sot hat I can test my draw routine
        public void PlayThread()
        {
            prog = new IntCode.ParallelCodeRunner();

            threadThis.Instance = this;
            threadThis.RunInThread();

            prog.Code           = code;
            prog.ExternalOutput = gameOutput;

            prog.RunInThread();
        }
Пример #2
0
        public void PlayUnlimited()
        {
            prog = new IntCode.ParallelCodeRunner();

            //start listener thread
            threadThis.Instance = this;
            threadThis.RunInThread();

            // set the program to play infinitely
            char[] array = code.ToCharArray();
            array[0] = '2';
            code     = new string(array);
            //prog.InitRAM(0, 2);

            prog.Code           = code;
            prog.ExternalOutput = gameOutput;

            // start code
            prog.RunInThread();
        }