De'Jon Johnson 6 лет назад
Родитель
Сommit
ed0cc73e65

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

@@ -1,11 +1,17 @@
1 1
 package io.zipcoder.casino;
2 2
 
3
-import java.util.ArrayList;
4
-import java.util.List;
5 3
 
6
-public class BJDealer extends Players {
4
+public class BJDealer extends BJPlayer {
7 5
 
8 6
 
7
+
8
+    public BJDealer() {
9
+    }
10
+
11
+    public BJDealer(Wallet playerWallet, Hand playerHand) {
12
+        super(playerWallet, playerHand);
13
+    }
14
+
9 15
     public void shuffle(){
10 16
 
11 17
     }

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

@@ -1,10 +1,19 @@
1 1
 package io.zipcoder.casino;
2 2
 
3
-public class BJPlayer extends Players {
3
+public class BJPlayer extends Player {
4 4
 
5
-    Wallet playerwallet;
5
+    Wallet playerWallet;
6 6
     Hand playerHand;
7 7
 
8
+    public BJPlayer() {
9
+    }
10
+
11
+    public BJPlayer(Wallet playerWallet, Hand playerHand) {
12
+        this.playerWallet = playerWallet;
13
+        this.playerHand = playerHand;
14
+
15
+    }
16
+
8 17
     public void hit(Deck deck){
9 18
 
10 19
     }

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

@@ -17,7 +17,10 @@ public class BlackjackGame {
17 17
 //        protected Double minTableBet;
18 18
 
19 19
 
20
-        public void main (String[]args){
20
+    public BlackjackGame() {
21
+    }
22
+
23
+    public void main (String[]args){
21 24
         BlackjackGame BlackjackGame = new BlackjackGame();
22 25
 
23 26
 

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

@@ -4,6 +4,9 @@ public class Card {
4 4
     private Suit suit;
5 5
     private Rank rank;
6 6
 
7
+    public Card() {
8
+    }
9
+
7 10
     public Card(Suit suit, Rank rank) {
8 11
         this.suit = suit;
9 12
         this.rank = rank;

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

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

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

@@ -3,9 +3,11 @@ package io.zipcoder.casino;
3 3
 import java.util.Stack;
4 4
 
5 5
 public class Deck {
6
-    Stack<String> ListofCards = new Stack<String>();
7
-
6
+    Stack<String> ListOfCards = new Stack<String>();
8 7
 
8
+    public Deck(Stack<String> listOfCards) {
9
+        ListOfCards = listOfCards;
10
+    }
9 11
 
10 12
     public void shuffle(){
11 13
 

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

@@ -4,6 +4,20 @@ public class Player {
4 4
 
5 5
     Wallet wallet;
6 6
 
7
+    public Player() {
8
+    }
9
+
10
+    public Player(Wallet wallet) {
11
+        this.wallet = wallet;
12
+    }
13
+
14
+    public Wallet getWallet() {
15
+        return wallet;
16
+    }
17
+
18
+    public void setWallet(Wallet wallet) {
19
+        this.wallet = wallet;
20
+    }
7 21
 
8 22
     public void play() {
9 23
 
@@ -14,4 +28,6 @@ public class Player {
14 28
     }
15 29
 
16 30
 
31
+
32
+
17 33
 }

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

@@ -8,6 +8,7 @@ public enum Suit {
8 8
     private final String symbol;
9 9
 
10 10
 
11
+
11 12
     Suit(String symbol){
12 13
         this.symbol =symbol;
13 14
     }

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

@@ -4,9 +4,16 @@ public class Wallet {
4 4
     String id;
5 5
     double money;
6 6
 
7
+    public Wallet() {
8
+    }
7 9
 
10
+    public Wallet(String id, double money) {
11
+        this.id = id;
12
+        this.money = money;
13
+    }
8 14
 
9 15
     public double getMoney(){
16
+
10 17
         return -1.0;
11 18
     }
12 19