Jason Gibbs пре 6 година
родитељ
комит
15b1847747

+ 36
- 36
src/main/java/io/zipcoder/casino/CardGame.java Прегледај датотеку

@@ -2,44 +2,44 @@ package io.zipcoder.casino;
2 2
 
3 3
 public abstract class CardGame implements Game, Gamble {
4 4
 
5
-    int playerHand;
6
-    int dealerHand;
7
-    int currentBet;
8
-    Player player;
9
-    CardDeck deck;
10
-
11
-    public CardGame(Player player) {
12
-
13
-        this.player = player;
14
-        this.deck = new deck();
15
-
16
-    }
17
-
18
-
19
-    public int drawCard() {
20
-
21
-
22
-    }
23
-
24
-    public void stand() {
5
+//    int playerHand;
6
+//    int dealerHand;
7
+//    int currentBet;
8
+//    Player player;
9
+//    CardDeck deck;
10
+//
11
+//    public CardGame(Player player) {
12
+//
13
+//        this.player = player;
14
+//        this.deck = new deck();
15
+//
16
+//    }
17
+//
18
+//
19
+//    public int drawCard() {
20
+//
21
+//
22
+//    }
23
+//
24
+//    public void stand() {
25
+//
26
+//    }
27
+//
28
+//    void startGame();
29
+//
30
+//    void endGame();
31
+//
32
+//    void declareWinner();
33
+//
34
+//    void bet(int currentBet) {
35
+//
36
+//    }
37
+//    void winBet() {
38
+//
39
+//    }
40
+//    void loseBet(Player player) {
25 41
 
26 42
     }
27 43
 
28
-    void startGame();
29
-
30
-    void endGame();
31
-
32
-    void declareWinner();
33
-
34
-    void bet(int currentBet) {
35
-
36
-    }
37
-    void winBet() {
38
-
39
-    }
40
-    void loseBet(Player player) {
41
-
42
-    }
43 44
 
44 45
 
45
-}

+ 19
- 13
src/main/java/io/zipcoder/casino/Casino.java Прегледај датотеку

@@ -5,21 +5,25 @@ public class Casino {
5 5
 
6 6
     private Player player;
7 7
     private String choice;
8
+    private Console console;
8 9
     //GameFactory gf;
9 10
 
10
-//    public void startCasino() {
11
-//        do {
12
-//            System.out.println("Welcome to the Zip Code Casino!");
13
-//            System.out.println("Which game would you like to play? :");
14
-//            System.out.println("1: BlackJack");
15
-//            System.out.println("2: Baccarat");
16
-//            System.out.println("3: Craps");
17
-//
18
-//            if () {
19
-//
20
-//            }
21
-//        }
22
-//    }
11
+    public void startCasino() {
12
+        do {
13
+            System.out.println("Welcome to the Zip Code Casino!");
14
+            System.out.println("Which game would you like to play? ");
15
+            System.out.println("1: BlackJack");
16
+            System.out.println("2: Baccarat");
17
+            choice = Console.askForInput("3: Craps");
18
+            System.out.println(choice);
19
+
20
+            if (choice.equalsIgnoreCase("1")) {
21
+
22
+            }
23
+        } while (false);
24
+
25
+        }
26
+ //   }
23 27
 
24 28
     public static void main(String[] args) {
25 29
 
@@ -29,5 +33,7 @@ public class Casino {
29 33
         cardDeck.getDeck();
30 34
         System.out.println(cardDeck.draw());
31 35
         cardDeck.deal(2);
36
+        Casino cas = new Casino();
37
+        cas.startCasino();
32 38
     }
33 39
 }

+ 5
- 5
src/main/java/io/zipcoder/casino/Gamble.java Прегледај датотеку

@@ -4,11 +4,11 @@ public interface Gamble {
4 4
 
5 5
 
6 6
 
7
-     int currentBet;
8
-
9
-     void bet(int);
10
-     void winBet(Player);
11
-     void loseBet(Player);
7
+//     int currentBet;
8
+//
9
+//     void bet(int);
10
+//     void winBet(Player);
11
+//     void loseBet(Player);
12 12
 
13 13
 
14 14
 

+ 1
- 1
src/main/java/io/zipcoder/casino/Game.java Прегледај датотеку

@@ -2,7 +2,7 @@ package io.zipcoder.casino;
2 2
 
3 3
 public interface Game {
4 4
    // variable of Player type
5
-    Player player;
5
+   // Player player;
6 6
 
7 7
     void startGame();
8 8
 

+ 4
- 4
src/main/java/io/zipcoder/casino/Main.java Прегледај датотеку

@@ -1,11 +1,11 @@
1 1
 package io.zipcoder.casino;
2 2
 
3 3
 public class Main {
4
-    public static void main(String[] args){
5
-        Casino casino =  new Casino();
6
-        casino.start();
4
+//    public static void main(String[] args){
5
+//        Casino casino =  new Casino();
6
+//        casino.start();
7 7
 
8
-    }
8
+//    }
9 9
 
10 10
 
11 11
 }