(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| class BoggleBoard | |
| def initialize(board) # takes nested array and sets it to board attribute | |
| @board = board | |
| end | |
| def create_word(*coords) # takes multiple arrays (representing individual coordinates), return string of the joined elements at the given coordinates | |
| coords.map { |coord| @board[coord.first][coord.last]}.join("") # splat operator '*' let's the method take multiple paramaters as an array | |
| end | |
| def get_letter(row, col) # takes index of row, index of column; returns letter at coordinate |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Tailwind colors for Flexoki theme by Steph Ango. https://stephango.com/flexoki | |
| const colors = { | |
| base: { | |
| black: '#100F0F', | |
| 950: '#1C1B1A', | |
| 900: '#282726', | |
| 850: '#343331', | |
| 800: '#403E3C', | |
| 700: '#575653', |