public void ShowBoardState(Sokoban.Domain.Maze maze) { Console.Clear(); Console.WriteLine("┌──────────┐ "); Console.WriteLine("| Sokoban | "); Console.WriteLine("└──────────┘ "); Console.WriteLine("─────────────────────────────────────────────────────────────────────────"); Show(maze); Console.WriteLine("─────────────────────────────────────────────────────────────────────────"); }
private void Show(Sokoban.Domain.Maze mazeModel) { int nRows = mazeModel.Height; int nCols = mazeModel.Width; for (int r = 0; r < nRows; r++) { for (int c = 0; c < nCols; c++) { Console.Write(_viewController.DrawFieldAt(c, r)); } Console.WriteLine(); } }
private void Show(Sokoban.Domain.Maze mazeModel) { int nRows = mazeModel.Height; int nCols = mazeModel.Width; BaseField current = mazeModel.Origin; BaseField neighbourBelow = current.FieldBelow; for (int r = 0; r < nRows; r++) { for (int c = 0; c < nCols; c++) { Console.Write(current.ToChar()); current = current.FieldToRight; } current = neighbourBelow; if (neighbourBelow != null) { neighbourBelow = current.FieldBelow; } Console.WriteLine(); } }