Skip to content

Coding practice demonstrating an awfully long method. Try to refactor this method.

License

Notifications You must be signed in to change notification settings

astridsawatzky/sudoku-kata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Kata

Coding practice demonstrating an awfully long method. Try to refactor this method.

This entire exercise consists of one function (static method Play in the Program class). It has around 1,000 lines of code and it implements entire Sudoku game following these steps:

  1. Construct a fully solved Sudoku board - this step ensures that there is the solution
  2. Remove certain number of digits from the board - this step constructs initial board which is guaranteed to have at least one solution.
  3. Try to find a rule which concludes that one digit can be added to the board.
  4. Repeat step 3 while new digits are being added to the board.

Final source of the Play function is the starting point for refactoring. Complete exercise consists of refactoring the Play function into a complete object model. There are no correct and incorrect solutions to the exercise - try to go as far as you can with building a better object-oriented solution which is still doing the same thing as the original function.

About

Coding practice demonstrating an awfully long method. Try to refactor this method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%