Browse Source

all my test pass

CHU1TA26 6 years ago
parent
commit
7f0d4c4298

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

8
 
8
 
9
 
9
 
10
 
10
 
11
-    public BlackJackPlayer(Wallet wallet, double bet) {
11
+    public BlackJackPlayer(Wallet wallet, double bet, Hand hand) {
12
         super(wallet, bet);
12
         super(wallet, bet);
13
         this. hand= hand;
13
         this. hand= hand;
14
     }
14
     }

+ 2
- 1
src/test/java/io/zipcoder/casino/TestPlayer.java View File

25
         //given
25
         //given
26
         Wallet wallet = new Wallet(100.00, "Nury H.");
26
         Wallet wallet = new Wallet(100.00, "Nury H.");
27
         Player player = new Player(wallet, 50);
27
         Player player = new Player(wallet, 50);
28
-
28
+        player.bet(50);
29
+         player.setState("wins");
29
         //when
30
         //when
30
         if (player.getState().equals("wins")){
31
         if (player.getState().equals("wins")){
31
             player.addWining();
32
             player.addWining();