|
@@ -5,27 +5,28 @@ import java.util.Scanner;
|
5
|
5
|
|
6
|
6
|
public class Casino {
|
7
|
7
|
public static void main (String [] args){
|
8
|
|
- String Start = Console.getStringInput("'Welcome to the BlackJack Game' \n do you want to play?");
|
|
8
|
+ String Start = Console.getStringInput("'Welcome to the BlackJack Game' \n do you want to play? Yes or No ");
|
|
9
|
+ String name = Console.getStringInput("what is your name");
|
|
10
|
+ String addMoneyToWallet = Console.getStringInput("How much money do you want to add to your wallet");
|
9
|
11
|
Integer bet = Console.getIntegerInput("Place your bet");
|
10
|
12
|
String hit = Console.getStringInput("Do you want to hit 'H' or Stand 'S'");
|
11
|
13
|
Deck theDeck = new Deck();
|
12
|
14
|
|
13
|
15
|
|
14
|
16
|
|
|
17
|
+ //initiate the player object
|
|
18
|
+ Wallet wallet =new Wallet(0.0, "");
|
|
19
|
+ Hand hand = new Hand (null);
|
|
20
|
+ BlackJackPlayer me = new BlackJackPlayer( wallet, 0.0, hand );
|
|
21
|
+ Dealer dealer = new Dealer(theDeck);
|
15
|
22
|
|
16
|
|
-//
|
17
|
|
-// //initiate the player object
|
18
|
|
-// BlackJackPlayer me = new Player(0.0, 0.0,);
|
19
|
|
-// Dealer dealer = new Player("Dealer");
|
20
|
|
-//
|
21
|
|
-// me.addCard(theDeck.dealNextCard());
|
22
|
|
-// dealer.addCard(theDeck.dealNextCard());
|
23
|
|
-// me.addCard(theDeck.dealNextCard());
|
24
|
|
-// dealer.addCard(theDeck.dealNextCard());
|
25
|
|
-//
|
26
|
|
-// //print initial hands
|
27
|
|
-// System.out.println("WELCOME TO THE BLACKJACK GAME!\n");
|
28
|
|
-// me.printHand(true);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+ //print initial hands
|
|
29
|
+// me.printHand(true);y
|
29
|
30
|
// dealer.printHand(false);
|
30
|
31
|
// System.out.println("\n");
|
31
|
32
|
//
|
|
@@ -40,7 +41,7 @@ public class Casino {
|
40
|
41
|
// System.out.print("Hit or Stay? (Enter H or S): ");
|
41
|
42
|
// ans = keyword.next();
|
42
|
43
|
// System.out.println();
|
43
|
|
-//
|
|
44
|
+////
|
44
|
45
|
// if (ans.compareToIgnoreCase("H") == 0){
|
45
|
46
|
// //add next card in the deck and store weather player is busted
|
46
|
47
|
// meDone = !me.addCard(theDeck.dealNextCard());
|