Exemplo n.º 1
0
        private bool SolutionChecker(LabyrinthPosition current)
        {
            // if start position is surrounded by "x" (player can't move) - return to re-initiate the labyrinth

            if (this[current.Right] == '-' ||
                this[current.Down] == '-' ||
                this[current.Left] == '-' ||
                this[current.Up] == '-')
            {
                return true;
            }

            return false;
        }
Exemplo n.º 2
0
        // Added indexers for convinience latter
        public char this[LabyrinthPosition position]
        {
            get
            {
                return this.labyrinthData[position.X, position.Y];
            }

            set
            {
                this.labyrinthData[position.X, position.Y] = value;
            }
        }
Exemplo n.º 3
0
 /* Or the moving logic can be completely implemented here */
 public void MakeTurnTo(LabyrinthPosition nextPosition)
 {
     throw new NotImplementedException("To be implemented");
 }