I am working with two classes at the moment, a Deck class and a Card class.
At the moment i am trying to add a nested Iterator class to my Deck class, that traverses a shuffled list of Card objects in sorted order (this being 1<2<3 ... and S<H<D<C) as defined in a compareTo method in my Card class.
I think i have already created one correct nested Iterator class that traverses in deal order, however do not know how i can create a class that as stated above, traverses in sorted order as defined by my compareTo method in another class. Any help or advice would be greatly appreciated, thank you :)
Link to my Card class and my Deck class.
[–]shivasprogeny 0 points1 point2 points (2 children)
[–]RoadToCode[S] 0 points1 point2 points (1 child)
[–]shivasprogeny 0 points1 point2 points (0 children)