Forums Register Login

Dealing with cards in a deck

+Pie Number of slices to send: Send
I have the following code and what I want to figure out is when I deal out the card and face them down I want to take the top card and show its value and suit. I already know how to deal the cards to the players and flip the cards. Just need help/advice on showing that card.


Here is deck class


Here is card class


Here is where my problem is
+Pie Number of slices to send: Send
The player's cards are in the hand array right? Which element of that array represents the top card? Then doesn't a card have a toString() method?

Why are you doing this in the Player constructor?

This code is saying "The player will initially have a hand with 26 blank Cards".

Did you really mean to do that? If this were a real card game and you dealt me a hand with 26 blank cards, I'd be all

Lastly, while it's admirable that you are trying to write JavaDocs, you should read this document: http://www.oracle.com/technetwork/articles/java/index-137868.html so you know how to write them properly. When it comes to JavaDocs, you should conform to the conventions given in that document and yours don't.
yeah, but ... what would PIE do? Especially concerning this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1816 times.
Similar Threads
Need help. Not getting proper output.
Error
Card Class and Drivers
How to test my code for proper function?
Imageicon and getImage() not working with JLabels
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:38:41.