Ejemplo n.º 1
0
 public Inputer(IIntCodeComputer brain)
 {
     this.brain = brain;
     brain.AddDelegate(this);
     instructions = " A,B,B,C,A,B,C,A,B,C\nL,6,R,12,L,4,L,6\nR,6,L,6,R,12\nL,6,L,10,L,10,R,6\nn\n".ToCharArray().Select(c => (long)c).ToArray();
     cursor       = 0;
 }
Ejemplo n.º 2
0
 public Game(IIntCodeComputer computer)
 {
     this.computer = computer;
     computer.AddDelegate(this);
     setupState  = SetupState.SetX;
     gameState   = new Dictionary <Point, GameTile>();
     orientation = JoystickOrientation.Neutral;
 }
Ejemplo n.º 3
0
 public Robot(IIntCodeComputer brain, PanelColor startPanelColor)
 {
     this.brain           = brain;
     this.direction       = RobotDirection.North;
     this.paintedPanels   = new Dictionary <Point, PanelColor>();
     this.position        = Point.Origin;
     this.shouldPaint     = true;
     this.startPanelColor = startPanelColor;
 }
Ejemplo n.º 4
0
        public Explorer(IIntCodeComputer computer, Point start)
        {
            this.computer = computer;
            computer.AddDelegate(this);

            direction       = Direction.North;
            currentPosition = start;
            map             = new Dictionary <Point, Block>();
            map.Add(currentPosition, Block.Empty);
            distance  = 0;
            distances = new Dictionary <Point, int>();
            distances.Add(currentPosition, 0);
        }
Ejemplo n.º 5
0
 public ScaffoldRobot(IIntCodeComputer brain)
 {
     this.brain = brain;
     brain.AddDelegate(this);
     map = new Dictionary <Point, char>();
 }