I am making a video poker game for my class assignment. I have the program running that gives out 5 cards.

I don't know the easiest way to do this but say after card1 suit1 is dealt I want those values stored so card2 suit2, card3 suit3, etc.... cannot have that combination.

I am using a random generator pulling intergers from an array list values 1-13. I am also doing the same pulling random suits to add to those cards. so my output will look something like

1 hearts
3 spades
12 clubs
5 clubs
8 spades

I'll fix the numbers later, I just need to correct this problem first.

Define a Card class with instance variables for rank and suit. Create an ArrayList containing all 52 possible Cards to represent a deck. Take Cards at random from the deck to deal hands.
Search the DaniWeb archives - there's lots of discussion about modelling card games

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.