Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #################################
- ### Sudoku Generator ###
- #################################
- # #
- # Generates a 9x9 Sudoku puzzle.#
- # #
- #################################
- #################################
- # Creates a 3x3 array that will #
- # either be filled with numbers #
- # randomly or left blank based #
- # on the boolean value of fill. #
- #################################
- def create3x3(fill)
- 3x3 = [[0,0,0],[0,0,0],[0,0,0]]
- if fill == true
- tempPool = [1,2,3,4,5,6,7,8,9]
- end
- return 3x3
- end
- puts create3x3(true)
Advertisement
Add Comment
Please, Sign In to add comment