in Games/Maze/GamePage.xaml.cs [305:334]
private void ClearSolution()
{
int stepCol = _numCols - 1;
int stepRow = _numRows - 1;
for (int step = _solution.Count() - 1; step > -1; step--)
{
var pos = _solution.ElementAt(step);
if (pos == Direction.Left)
{
stepCol++;
}
if (pos == Direction.Right)
{
stepCol--;
}
if (pos == Direction.Up)
{
stepRow++;
}
if (pos == Direction.Down)
{
stepRow--;
}
var cell = MazeGrid.Children.Cast<FrameworkElement>().First(b => Grid.GetRow(b) == stepRow && Grid.GetColumn(b) == stepCol) as Border;
cell.Background = null;
}
}