Exemplo n.º 1
0
        public void Install(BaseChip chip, Point point)
        {
            chips[point] = chip;
            if (pointsToNames.ContainsKey(point)) {
                chip.Name = pointsToNames[point];
            }

            foreach (var dir in Direction.Enumerate()) {
                var other = GetChip(point.Add(dir));
                var rw1 = chip.CustomRW() ?? other.CustomRW() ?? new BufferRW();
                var rw2 = chip.CustomRW() ?? other.CustomRW() ?? new BufferRW();
                var channel = new Channel(rw1, rw2);
                chip.Connections[dir.Name] = channel.Terminal2;
                other.Connections[dir.Opposite] = channel.Terminal1;
            }
        }
Exemplo n.º 2
0
 public RW Reference(BaseChip chip)
 {
     return RW;
 }
Exemplo n.º 3
0
 public RW Reference(BaseChip chip)
 {
     return chip.Connections[RefName];
 }