private Square[,] Initialize(char[,] maze) { var points = new Square[this.TotalRows, this.TotalCols]; for (var row = 0; row < this.TotalRows; row++) { for (var col = 0; col < this.TotalCols; col++) { var point = new Point(row, col); var value = maze[row, col]; points[row, col] = new Square(point, FromChar(value), value); if (FromChar(value) == SquareContent.StartingPoint) { this.StartingSquare = new Square(point, SquareContent.StartingPoint, value); } } } return points; }
private string GetPrintSymbol(Square square) { if (square.SquareContent == SquareContent.Available) { if (square.Distance == 0) { return "u"; } return square.Distance.ToString(); } return square.Value.ToString(); }