Exemplo n.º 1
0
            public List <MyBorder> GetMarkedNeightborPoint(MyGridPoint myGridPoint, MazeMark mazeMark)
            {
                List <MyBorder> list = new List <MyBorder>();

                if (myGridPoint.Col - 1 >= 0)
                {
                    if (MyBorder[myGridPoint.Row, myGridPoint.Col - 1].mazeMark == mazeMark)
                    {
                        list.Add(MyBorder[myGridPoint.Row, myGridPoint.Col - 1]);
                    }
                }
                if (myGridPoint.Row - 1 >= 0)
                {
                    if (MyBorder[myGridPoint.Row - 1, myGridPoint.Col].mazeMark == mazeMark)
                    {
                        list.Add(MyBorder[myGridPoint.Row - 1, myGridPoint.Col]);
                    }
                }
                if (myGridPoint.Col + 1 < size.Cols)
                {
                    if (MyBorder[myGridPoint.Row, myGridPoint.Col + 1].mazeMark == mazeMark)
                    {
                        list.Add(MyBorder[myGridPoint.Row, myGridPoint.Col + 1]);
                    }
                }
                if (myGridPoint.Row + 1 < size.Rows)
                {
                    if (MyBorder[myGridPoint.Row + 1, myGridPoint.Col].mazeMark == mazeMark)
                    {
                        list.Add(MyBorder[myGridPoint.Row + 1, myGridPoint.Col]);
                    }
                }
                return(list);
            }
Exemplo n.º 2
0
 public MyBorder GetBorder(MyGridPoint myGridPoint) => MyBorder[myGridPoint.Row, myGridPoint.Col];
Exemplo n.º 3
0
 public MyBorder(MyGridPoint myGridPoint)
 {
     point           = myGridPoint;
     BorderThickness = WallThickness;
     mazeMark        = MazeMark.Map;
 }