Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Card game input... waiting for user to decide move

807598Sep 5 2006 — edited Sep 6 2006
hello,

I am implementing a java version of BlackJack for a bit of practise:

http://img432.imageshack.us/my.php?image=blackjackjr6.jpg

As you can see I have the graphics all set up, and the game runs fine with all computer players, but I need some help implementing the human player as I need the game to "wait" when its the Users go as I'm currently using a
 
while (players have not passed)
{
   		if(currentPlayer.play())
    		{
    			currentPlayer.takeCard(dealer.nextCard());
    		}
    		repaint();
    		currentPlayer = nextPlayer();
}
winner();
I dont think this is the best method when involving a human player in the game but can't work out where to go!

Thanks in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2006
Added on Sep 5 2006
6 comments
156 views