Results 1 to 1 of 1
Thread: players hand class. Need help!
- 04-26-2012, 12:20 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 8
- Rep Power
- 0
players hand class. Need help!
So I need to make a void addCardToHand(c) class that adds the paramenter card to the hand. I'm not sure how to do this and I'm drawing a blank. This class is tied in with the Card and Deck class that I have already created. This is what I have so far.
Java Code:import java.util.*; public class Player { private String player = ""; private String player2 = ""; private Card[] hand = new Card[52]; //defult constructer public Player ( String playerName) { this.player = playerName; this.hand = new Card[52]; } //adds a card to the hand public void addCardToHand( Card c ) { } }Last edited by cjgarcia; 04-26-2012 at 12:49 AM.
Similar Threads
-
Java HangMan - Alternate between players
By JohnyQ in forum NetworkingReplies: 1Last Post: 11-22-2011, 02:45 AM -
Need help for my application: Stroke Class & Free hand drawings
By JavaIsChallenging in forum AWT / SwingReplies: 0Last Post: 09-23-2011, 06:17 PM -
Alternating between players moves in a game
By nephos in forum New To JavaReplies: 3Last Post: 04-18-2011, 08:39 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks