Exemplo n.º 1
0
        /// <summary>
        /// Set state of an element to Block
        /// </summary>
        /// <param name="object"></param>
        private void setBlock(object o)
        {
            if (solutionMode)
            {
                ExitSolutionMode();
            }
            Label label = (Label)o;

            if (maze.AddBlock(getLabelPosition(label.Name)))
            {
                label.Background = new SolidColorBrush(colorScheme.BlockColor);
                startPos         = maze.StartPos;
                finishPos        = maze.FinishPos;
            }
        }