Пример #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;
            }
        }
Пример #2
0
 public RW Reference(BaseChip chip)
 {
     return RW;
 }
Пример #3
0
 public RW Reference(BaseChip chip)
 {
     return chip.Connections[RefName];
 }