black jack game

Reply

Join Date: Jan 2006
Posts: 1
Reputation: daviie is an unknown quantity at this point 
Solved Threads: 0
daviie daviie is offline Offline
Newbie Poster

black jack game

 
0
  #1
Jan 3rd, 2006
hi, i need some help with this black jack game. it has a server and a client part.
the server is supposed to handle the cards and be automatic, and the client is handled by the user.

i want the server to shuffle the deck at the beginning, and when the user presses "new card" the next card in the decks value will show up.

i am a beginner at java so please explain so i can understand
Attached Files
File Type: java Client7.java (3.1 KB, 32 views)
File Type: java Server.java (1.1 KB, 27 views)
File Type: java Deck.java (1.5 KB, 32 views)
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 762
Reputation: Phaelax is on a distinguished road 
Solved Threads: 38
Phaelax Phaelax is offline Offline
Master Poster

Re: black jack game

 
0
  #2
Jan 3rd, 2006
1. Just make an ArrayList of cards, the cards can be in any order.
2. Randomly select an index to grab a card.
3. Remove that card from the list (deck)
4. when you want to reshuffle a new deck, just rebuild the array list with all 52 cards and pick a new "seed" for the randomizer.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC