Ejemplo n.º 1
0
        public SimulationCell FullClone()
        {
            var ret = new SimulationCell();

            foreach (var l in this)
            {
                ret.AddLine((StandardLine)l.Clone());
            }
            return(ret);
        }
Ejemplo n.º 2
0
        private SimulationCell GetPairs(StandardLine input)
        {
            var list  = new SimulationCell();
            var c1    = _editorcells.GetCellFromPoint(input.Position);
            var c2    = _editorcells.GetCellFromPoint(input.Position2);
            var cells = new LineContainer <GameLine>[]
            {
                c1,
                c1 == c2 ? null : c2
            };

            foreach (var cell in cells)
            {
                if (cell == null)
                {
                    continue;
                }
                foreach (var line in cell)
                {
                    if (line.Type == LineType.Scenery)
                    {
                        continue;
                    }
                    if (line.ID != input.ID)
                    {
                        if (
                            line.End == input.Start ||
                            line.Start == input.End)
                        {
                            list.AddLine((StandardLine)line);
                        }
                    }
                }
            }
            return(list);
        }