Skip to content

Instantly share code, notes, and snippets.

View synergit's full-sized avatar
🏠
Working from home

Chloe synergit

🏠
Working from home
View GitHub Profile
#!/usr/bin/env ruby
# construct the array of possibilities
def construct_board(board)
unknown_count = 0
board.each_with_index do |row, row_index|
row.each_with_index do |cell_value, column_index|
if cell_value.nil?
board[row_index][column_index] = (1..9).to_a