This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| what is going on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #PSEUDOCODE | |
| #take 'dice_grid' as input to initialize, set @dice_grid = dice_grid | |
| #define #create_word - no longer needs 'board' parameter, can just use @dice_grid. only need *coords param | |
| #define #get_row and #get_col like before, but no 'board' parameter, act on @dice_grid | |
| #define #get_coord: take array.length == 2 as input, return @dice_grid[array[0][array[1]] | |
| class BoggleBoard | |
| def initialize(dice_grid) | |
| @dice_grid = dice_grid | |
| end | |
NewerOlder