Jump to content
  • Advertisement
Sign in to follow this  
Mad_Coder

Project Design Flaws

This topic is 3664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I been wrtiing a projet to brute force solve a sudoku puzzle: http://gamdev.pastebin.com/d22d6d200 I can't figure out why the Sudoku::cUpdate::candidates() function fails to set numbers that are not candidates fo the square on call to checkColumnCandidates(rSquare,c,cand); on line 318. What I am more worried about it organizaing my classes so their is more order to one class doing most stuff like the cSquare class objects for the 81 squares upated itself without calling another update object. Also The odd way I pass parameters to dertermine which row and column I am refering to in funcitons like checkColumnCandidates() and checkRowCandidates() is a little bit confusing an leads to overall confusion. Please give me some hints on how I could redo my design of the project!

Share this post


Link to post
Share on other sites
Advertisement
Solving Su Doku is a simple problem, as long as you write the solving algorithm down on paper before translating it into code.

Also make sure that your translation techniques are solid. For instance, it's easier to deal with one-dimensional data in C++ than two-dimensional data. So, converting iterations of the form "traverse all squares" and "find a square that" into one-dimensional iterations is always a good strategy.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!