Because in the case of Sudoku board generation random generation of numbers was paramount therefore I used
random_shuffle
. Help used was from :https://bytes.com/topic/c/answers/578206-random-number-generator-use-random_shuffle
and
http://stackoverflow.com/questions/12540918/shuffle-vector-in-c/12541009
Even though the game winning condition does not work in my project by employing the above mentioned method I do not waste my memory into file reading of solved boards and then making my game board. I am able to generate infinite number of different boards without wasting any memory.
No comments:
Post a Comment