1. package project3;
  2.  
  3. public class Deck {
  4.  
  5. private Node front;
  6. private int remainingCards = 52;
  7.  
  8. public Deck()
  9. {
  10. for(int i = 0; i < 52; i++)
  11. {
  12. if(i == 0)
  13. {
  14. front = new Node(new Card(i));
  15. }
  16. else{
  17. front.setNext(new Node(new Card(i)));
  18. }
  19. }
  20. }
  21. public String toString()
  22. {
  23. String output = new String("Cards \n");
  24. Node temp = front;
  25. while(temp.getNext() != null)
  26. {
  27. output += temp + "\n";
  28. }
  29. return output;
  30. }
  31. }
  32.