Guest User

Untitled

a guest
Feb 7th, 2014
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #################################
  2. ###      Sudoku Generator     ###  
  3. #################################
  4. #                               #
  5. # Generates a 9x9 Sudoku puzzle.#
  6. #                               #
  7. #################################
  8.  
  9. #################################
  10. # Creates a 3x3 array that will #
  11. # either be filled with numbers #
  12. # randomly or left blank based  #
  13. # on the boolean value of fill. #
  14. #################################
  15.  
  16. def create3x3(fill)
  17.  
  18.     3x3 = [[0,0,0],[0,0,0],[0,0,0]]
  19.  
  20.     if fill == true
  21.         tempPool = [1,2,3,4,5,6,7,8,9]
  22.     end
  23.  
  24.     return 3x3
  25. end
  26.  
  27. puts create3x3(true)
Advertisement
Add Comment
Please, Sign In to add comment