/SudokuSolver

In order to get some practice with Ruby, I created a simple Sudoku Solver. You can either solve the default puzzle or input your own puzzle. Example found in repo.

Primary LanguageRuby

SudokuSolver

In order to get some practice with Ruby, I created a simple Sudoku Solver. You can either solve the default puzzle or input your own puzzle. Example found in repo.

First, I wrote this the best I possibly could with my current Ruby knowledge. Got the logic down and the program worked great, however, there was a lot of code duplication and extraneous statements. I didn't know this after initially writing it though.

Next, I took an advanced course in Ruby to learn about all the neat things you can do with it.

After spending a collective 10-15 hours on the course, I refactored my program and definitely cleaned it up.

Finally, I decided to learn how to use minitest which I highly recommend. I implemented unit test so I will know how to do it next time to I can code with the TDD (Test-Driven Development). This philosophy sounded good on paper, unfortunately I haven't tried it out yet. If it yield any results like when I implemented it for this project (I found multiple unintended behaviors) I have a feeling I will like that method.

Pretty happy with it and would love any suggestions to make it better so I know for next time!

NOTE: I have tested it on Easy, Medium, and Hard puzzles. Easy and Medium puzzles will be solved, but Hard puzzles will not be. It solves about a third of it before it needs logic that I have not implemented yet.