Exemplo n.º 1
0
        internal void Remove(int x, int y)
        {
            List <Point> result = null;

            result = wireSolver.RemoveWire(x, y);
            foreach (Point t in result)
            {
                try
                {
                    yaaaay[t].updateWireState(wireSolver.getWireTransfer(t));
                }
                catch { }
            }
            StringBuilder sb = new StringBuilder();

            foreach (Point t in result)
            {
                sb.AppendLine(t.ToString());
            }
        }
Exemplo n.º 2
0
        internal void TriggerOnWire(Point location)
        {
            WireTransfer transferItem = wireSlower.getWireTransfer(location);

            List <Point>        pointsToTrigger;
            WireCurrentTransfer transferType = WireCurrentTransfer.DOWN | WireCurrentTransfer.LEFT | WireCurrentTransfer.RIGHT | WireCurrentTransfer.UP;

            if (transferItem.isPowered() && transferItem.getTransfer() == transferType)
            {
                pointsToTrigger = wireSlower.RemoveWire(location.X, location.Y);
                //form.Remove(location.X, location.Y);
            }
            else
            {
                pointsToTrigger = wireSlower.AddOrUpdateWire(location.X, location.Y, CurrentType.SENDER, WireCurrentTransfer.NONE);
                //form.AddOrUpdateWire(location.X, location.Y, CurrentType.SENDER, WireCurrentTransfer.NONE);
            }

            HandleItems(pointsToTrigger, location);
        }