BracketCove / JavaDesktopSudoku

Demo application for Working Class Java
70 stars 47 forks source link

Replace duplicated code in SudokuUtilities #3

Closed a2937 closed 3 years ago

a2937 commented 3 years ago

Since the two loops seemed practically identical ; I can't think of a reason why we can't just call our already established function.

BracketCove commented 3 years ago

You're probably right, but did you verify this with a test? If so I'll merge the change.

Thanks.

a2937 commented 3 years ago

I have added a test that ensures the code still functions correctly. And proves the result is the same. Granted since I modified the codebase to use the same internal method; I'd be surprised if they didn't have the same result.

BracketCove commented 3 years ago

Thanks for the fix.

"Granted since I modified the codebase to use the same internal method; I'd be surprised if they didn't have the same result."

Appreciate the test. I didn't look at the code myself, and when you said "practically identical" I just wanted to be sure.