Displaying the Dijkstra's Matrix
Learn the Ruby code to display Dijkstra's matrix on the console.
We'll cover the following...
We'll cover the following...
Adding the contents_of(cell) method to the Grid class
We'll open up grid.rb and add the new method, contents_of(cell) just before the to_s method.
def contents_of(cell)" "end
The contents_of(cell) method
Now, in the grid.rb class, we'll have to find the to_s method. We’re going to change one line, the bit that describes the body of the cell so that it calls our new contents_of(cell) method. This particular line ...