예제 #1
0
        private bool CheckUp()
        {
            bool freeToMove = true;

            int x = xAxes - 1;
            int y = yAxes - 1;

            for (int i = 0; i < 2; i++, y--)
            {
                for (int j = 0; j < 3; j++, x++)
                {
                    if (mazeData.Contains(x, y) || y < 0 || x > rightEdge)
                    {
                        freeToMove = false;
                        if (!freeToMove)
                        {
                            break;
                        }
                    }
                }
                if (!freeToMove)
                {
                    break;
                }
                x = xAxes - 1;
            }
            return(freeToMove);
        }
예제 #2
0
 public bool freeToMove(int x, int y)
 {
     return(!haveCheched.Contains($"{x},{y}") && mazeData.Contains(x, y));
 }