private void GetOutput() { while (_outputQueue.Count == 0) { _vm.Step(); if (_vm.IsDone) { return; } } long paintColour = _outputQueue.Dequeue(); while (_outputQueue.Count == 0 && _vm.IsDone == false) { if (_vm.IsDone) { return; } _vm.Step(); } long turnDirection = _outputQueue.Dequeue(); DoPaint(paintColour); DoTurn(turnDirection); DoMove(); }
public void Step() => _intcodeVirtualMachine.Step();