public ArcadeCabinet(IntCodeCpu cpu, BigInteger[] program) { this.cpu = cpu; this.program = program; VideoBuffer = new VideoBuffer(); Screen = new ConsoleRenderer(VideoBuffer); Reset(); }
public MazeWalker(IntCodeCpu cpu, BigInteger[] program) { Direction = Direction.Right; Position = (0, 0); Tiles = new Dictionary <(int X, int Y), MazeMovementOption>() { { (0, 0), new MazeMovementOption((0, 0), MazeTileType.Empty) } }; this.cpu = cpu; this.cpu .Load(program) .Input(() => (int)DirectionLeft) .Output((Action <BigInteger>) this.HandleCpuOutput); // .AfterSteps(1000, _ => { RenderMap() }); }