import java.util.function.IntConsumer;

import java.util.*;

public class GameEngine
{
    public GameEngine (Vector<String> instructions, boolean debug)
    {
        _computer = new Intcode(instructions, INITIAL_INPUT, debug);
        _debug = debug;
    }

    public final boolean playGame ()
    {
        int x = 0;
        int y = 0;
        int id = TileId.EMPTY;

        while (!_computer.hasHalted())
        {
            while (!_computer.hasOutput())
            {
                _computer.singleStepExecution(INITIAL_INPUT);
            }

            x = Integer.parseInt(_computer.getOutput());

            if (!_computer.hasHalted())
            {
                while (!_computer.hasOutput())
                {
                    _computer.singleStepExecution(INITIAL_INPUT);
                }

                y = Integer.parseInt(_computer.getOutput());

                if (!_computer.hasHalted())
                {
                    while (!_computer.hasOutput())
                    {
                        _computer.singleStepExecution(INITIAL_INPUT);
                    }

                    id = Integer.parseInt(_computer.getOutput());
                }
                else
                {
                    System.out.println("Error - computer halted after y!");

                    return false;
                }

                System.out.println("**got "+x+" "+y+" "+TileId.idToString(id));
            }
            else
            {
                System.out.println("Error - computer halted after x!");

                return false;
            }
        }

        return true;
    }

    private Intcode _computer;
    private boolean _debug;

    private static final int INITIAL_INPUT = 0; // nothing specified in the overview
}
@@ -452,31 +452,109 @@
 .has
-Output())%0A            %7B
+Halted() && !_computer.hasOutput())%0A            %7B%0A                System.out.println(%22**checking x%22);
 %0A   
@@ -754,32 +754,58 @@
          while (
+!_computer.hasHalted() && 
 !_computer.hasOu
@@ -822,32 +822,88 @@
               %7B%0A
+                    System.out.println(%22**checking y%22);%0A
                 
@@ -1114,32 +1114,58 @@
          while (
+!_computer.hasHalted() && 
 !_computer.hasOu
@@ -1186,32 +1186,93 @@
               %7B%0A
+                        System.out.println(%22**checking id%22);%0A
                 

Update GameEngine.java