コード例 #1
0
ファイル: Labyrinth.cs プロジェクト: studware/Labirint7
        // 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;
            }
        }
コード例 #2
0
ファイル: Labyrinth.cs プロジェクト: studware/Labirint7
        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);
        }
コード例 #3
0
 /* Or the moving logic can be completely implemented here */
 public void MakeTurnTo(LabyrinthPosition nextPosition)
 {
     throw new NotImplementedException("To be implemented");
 }