Skip to content

Instantly share code, notes, and snippets.

@raderj89
Created February 1, 2014 16:10
Show Gist options
  • Save raderj89/8754290 to your computer and use it in GitHub Desktop.
Save raderj89/8754290 to your computer and use it in GitHub Desktop.
class BoggleBoard
#your code here
end
dice_grid = [["b", "r", "a", "e"],
["i", "o", "d", "t"],
["e", "c", "l", "r"],
["t", "a", "k", "e"]]
boggle_board = BoggleBoard.new(dice_grid)
=begin
The instructions for the bonus '#get_diagonal' state, "method should return an array of values, but it will need 2 coordinates
entered to define the diagonal.
So just like the '#create_word' method, I assume they want to arguments that are coordinates, i.e. get_diagonal([1,1], [2,2])
My question is, what exactly are we supposed to return? The exercise says an array of values, but do they just want the two
values passed to '#get_diagonal' if they are diagonal? For example, using the dice grid above, get_diagonal([1,1], [2,2])
would return ["o","l"] or I suppose, ["l","o"], but should it also return the rest of the values that are directly diagonal
from these letters, ["b", "e"] ?
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment