예제 #1
0
 public static void PrintElementsBackwards(AbstractDataStructures.Stack<int> elements)
 {
     while (elements.Count > 0)
     {
         Console.WriteLine(elements.Pop());
     }
 }
예제 #2
0
 private void TryVisitCell(AbstractDataStructures.Stack<Cell> visitedCells, string[,] matrix, Cell cell)
 {
     if (this.IsCellAccessible(matrix, cell))
     {
         visitedCells.Push(cell);
         matrix[cell.X, cell.Y] = cell.Value.ToString();
     }
 }