Jump to content
  • Advertisement
Sign in to follow this  
Asheh

Card Solver

This topic is 4564 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

Ive never created anything before which requires "searching" for every possibility. So im not really sure how to do it. I have 5 cards on each row. Where there are 5 rows in total. Any single card on each row can be matched up with any card on another row to make a poker hand. I need to search for the best possible poker hand based on this. Any advice? Cheers Ash

Share this post


Link to post
Share on other sites
Advertisement
You could make a hand data type that stored the values of the 5 cards in the players hand, then just loop through all the possible combinations and use some simple logic statements to figure out what that hand is. Whatever hand comes out being the best, that's what you're looking for. Granted, there's 9 different hands you could have so that's alot of logicizing, but it would work, hopefully [grin]. Anyway, hope that helped and anyone else please feel free to correct me, slap me around, or whatever if I did it the wrong way.

-AJ

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!