Example #1
0
        private void AddWireCell(int x, int y)
        {
            WireCellLookup wireCellLookup = new WireCellLookup
            {
                X = x,
                Y = y
            };

            WireCell wireCell = new WireCell
            {
                X          = x,
                Y          = y,
                WireNumber = currentWireNumber
            };

            bool isCrossing = wireCells.TryAdd(wireCellLookup, wireCell);

            if (!isCrossing && !IsSameWire(wireCellLookup))
            {
                Logger.Log($"Intersection at X: {x} and Y: {y}.");
                wireCells[wireCellLookup].IsIntersection = true;
            }
        }
Example #2
0
 private bool IsSameWire(WireCellLookup wireCellLookup)
 {
     return(wireCells[wireCellLookup].WireNumber == currentWireNumber);
 }