Vincent Sima 6 лет назад
Родитель
Сommit
ac22e93857

+ 1
- 1
src/main/java/io/zipcoder/casino/BlackJack.java Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 package io.zipcoder.casino;
2 2
 
3
-public class BlackJack extends CardGames {
3
+public class BlackJack extends CardGame {
4 4
     int playerHand;
5 5
     int dealerHand;
6 6
     int currentBet;

+ 36
- 36
src/main/java/io/zipcoder/casino/CardGame.java Просмотреть файл

@@ -2,42 +2,42 @@ 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() {
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) {
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) {
41 41
 
42 42
     }
43 43
 

+ 3
- 1
src/main/java/io/zipcoder/casino/Casino.java Просмотреть файл

@@ -18,12 +18,14 @@ public class Casino {
18 18
             System.out.println(choice);
19 19
 
20 20
             if (choice.equalsIgnoreCase("1")) {
21
+                BlackJack blackjack = new BlackJack();
22
+                blackjack.start();
21 23
 
22 24
             }
23 25
         } while (false);
24 26
 
25 27
         }
26
- //   }
28
+
27 29
 
28 30
     public static void main(String[] args) {
29 31
 

+ 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.startCasino();
7 7
 
8
-//    }
8
+    }
9 9
 
10 10
 
11 11
 }