![]() |
| ||
| black jack game 3 Attachment(s) 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 ;) |
| ||
| Re: black jack game 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. |
| All times are GMT -4. The time now is 8:09 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC