I am trying to make text based blackjack game. I already made :
- Card class which create new card based on integer
- Deck class which consists of Deck LinkedList populated by Card.
I also made 2 new LinkedLists for gambler and dealer. I already managed to remove elements from a shuffled Deck and add them to the new Lists using
However I am stumped on how to count the total of the elements inside gambler and dealer without removing them. If I used peek() method, it only take the head of the lists.
Any help is appreciated.