View Single Post
  #4 (permalink)  
Old 12-08-2007, 09:01 AM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
If i'm going about doing deal cards right by my instructions
As far as I can tell with casual inspection, yes it looks okay.
If I had the PlayingCard class I could run it and maybe learn more.
what it means when it says "when method dealCards returns, call the method handTotal to display the value of the players hand"
Like this:
Code:
PlayerHand bobsHand = new PlayerHand(); bobsHand.dealCards(deck); int bobsPoints = bobsHand.handTotal(); System.out.println("bobsPoints = " + bobsPoints);); DealerHand shady = new DealerHand(); shady.dealCards(deck); int dealerPoints = shady.handTotal(); System.out.println("dealerPoints = " + dealerPoints); if(dealerPoints >= bobsPoints){ System.out.println("Dealter wins");} else System.out.println("Player wins");
Reply With Quote