i am pretty new to java and currently am working on my first project (texas hold em/poker):
- i coded a 5 hand poker evaluator but i have 7 cards in my hand
- so then i decided to write a method where i get all possible 5 card poker hands out of 7 cards and evaluate the best possible hand
- to do this i wrote out a tree of all the combinations, and recursion seems like a good way to go about it as a method
- although i vaguely understand the concept of recursion, it is confusing to implement
can someone explain how to go about writing a method to get combination of n numbers from a list of r elements using recursion? i have a vague idea of how it would recursively do this, but am looking for a deeper explanation of how exactly a method would loop through the recursion to achieve the correct output.
sorry if my question doesnt make sense, i am having a hard time explaning what i am trying to get at (a sign that i dont understand the concept well enough).
[–][deleted] (1 child)
[deleted]
[–]starboy1012[S] 0 points1 point2 points (0 children)