private void OnMazeCellClick()

in Games/Maze/GamePage.xaml.cs [644:679]


        private void OnMazeCellClick(object sender, RoutedEventArgs e)
        {
            if (_animationIsRunning || _interactionPaused) return;

            if (_isMazeSolved || _solutionTimer.IsEnabled || _cellCreationTimer.IsEnabled || _openCellTimer.IsEnabled)
            {
                return;
            }

            var button = sender as Button;

            var col = Grid.GetColumn(button.Parent as FrameworkElement);
            var row = Grid.GetRow(button.Parent as FrameworkElement);

            var crumbNum = TryMoveRunner(row, col);
          
            var curContent = _curButton.Content;
            _curButton.Content = null;
            Border curBorder = MazeGrid.Children.Cast<FrameworkElement>().First(b => Grid.GetRow(b) == _curRow && Grid.GetColumn(b) == _curCol) as Border;
            _curButton = curBorder.Child as Button;

            if (!((row == _numRows - 1) && (col == _numCols - 1)))
            {
                _curButton.Content = curContent;
            }            

            //if ((_curRow == _numRows - 1) && (_curCol == _numCols - 1))
            //{
            //    _curButton.Content = _mazeComplete;
            //    HideMazeRunnerVisual(crumbNum);
            //    string message = $"Congratulations!! You have solved the maze!";
            //    DialogText.Text = message;
            //    DialogGrid.Visibility = Visibility.Visible;
            //    _isMazeSolved = true;
            //}
        }