Browse Source

added ante

Jonathan Hinds 6 years ago
parent
commit
9a4c603e75

+ 3
- 1
src/main/java/io/zipcoder/casino/CardGame.java View File

9
     private int minBet;
9
     private int minBet;
10
     private int maxBet;
10
     private int maxBet;
11
     private int handSize;
11
     private int handSize;
12
+    private int ante;
12
     private Player playersTurn;
13
     private Player playersTurn;
13
     private ArrayList<CardPlayer> players;
14
     private ArrayList<CardPlayer> players;
14
     private ArrayList<Card> deck = new ArrayList<>();
15
     private ArrayList<Card> deck = new ArrayList<>();
15
 
16
 
16
 
17
 
17
-    CardGame(int minBet, int maxBet){
18
+    CardGame(int minBet, int maxBet, int ante){
18
         this.minBet = minBet;
19
         this.minBet = minBet;
19
         this.maxBet = maxBet;
20
         this.maxBet = maxBet;
21
+        this.ante = ante;
20
     }
22
     }
21
 
23
 
22
     //use hand size to determine dealing
24
     //use hand size to determine dealing

+ 0
- 2
src/main/java/io/zipcoder/casino/Dice.java View File

6
     private int value;
6
     private int value;
7
 
7
 
8
     public void roll(){
8
     public void roll(){
9
-
10
         value = (int) (Math.random()*6+1);
9
         value = (int) (Math.random()*6+1);
11
-
12
     }
10
     }
13
 
11
 
14
     public int getValue()
12
     public int getValue()

+ 3
- 2
src/main/java/io/zipcoder/casino/War.java View File

31
      * Below 3 Implemented from Gamble
31
      * Below 3 Implemented from Gamble
32
      */
32
      */
33
     public void Bet(int betAmount) {
33
     public void Bet(int betAmount) {
34
-
34
+        //add money to the pot
35
     }
35
     }
36
 
36
 
37
     public int Payout(int payoutAmount) {
37
     public int Payout(int payoutAmount) {
38
+
38
         return 0;
39
         return 0;
39
     }
40
     }
40
 
41
 
41
     public void Ante(int anteAmount) {
42
     public void Ante(int anteAmount) {
42
-
43
+        //
43
     }
44
     }
44
 
45
 
45
     /**
46
     /**

+ 0
- 1
src/test/java/io/zipcoder/casino/DeckTest.java View File

26
         //THEN
26
         //THEN
27
         Card testCard = deck.pullCard();
27
         Card testCard = deck.pullCard();
28
         String actual = testCard.getName();
28
         String actual = testCard.getName();
29
-
30
         Assert.assertEquals(expected, actual);
29
         Assert.assertEquals(expected, actual);
31
     }
30
     }
32
 }
31
 }