瀏覽代碼

fixed code

Zavon Malone 6 年之前
父節點
當前提交
cea1265ac9

+ 2
- 2
README.md 查看文件

@@ -10,8 +10,8 @@
10 10
 
11 11
 ## Specs
12 12
 * The project should include some concept of
13
-  * `Player` class
14
-    * `Player` objects should be created upon input from a user.
13
+  * `io.zipcoder.casino.Player` class
14
+    * `io.zipcoder.casino.Player` objects should be created upon input from a user.
15 15
   * `Game` interface
16 16
     * Contract which ensures that a class enforces some aspect of _playing_.
17 17
   * `Gamble` interface

+ 11
- 0
src/main/java/io/zipcoder/casino/BlackjackDealer.java 查看文件

@@ -0,0 +1,11 @@
1
+package io.zipcoder.casino;
2
+
3
+public class BlackjackDealer extends blackjackPlayer {
4
+    public void dealCards(Player player, Card card){
5
+
6
+    }
7
+
8
+    public void takeBet(Player player, double money){
9
+
10
+    }
11
+}

+ 0
- 11
src/main/java/io/zipcoder/casino/Dealer.java 查看文件

@@ -1,11 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-public class Dealer extends Player {
4
-    public void dealCards(Player player, Card card){
5
-
6
-    }
7
-
8
-    public void takeBet(Player, double money){
9
-
10
-    }
11
-}

+ 4
- 2
src/main/java/io/zipcoder/casino/Hand.java 查看文件

@@ -1,9 +1,11 @@
1 1
 package io.zipcoder.casino;
2 2
 
3
+import java.util.List;
4
+
3 5
 public class Hand {
4
-    private cards = List <card>;
6
+    private  List<Card> cards;
5 7
 
6
-    public void add(card){
8
+    public void add(Card cards){
7 9
 
8 10
     }
9 11
 

src/main/java/Player.java → src/main/java/io/zipcoder/casino/Player.java 查看文件

@@ -1,3 +1,5 @@
1
+package io.zipcoder.casino;
2
+
1 3
 import io.zipcoder.casino.Hand;
2 4
 
3 5
 public class Player {

src/main/java/blackjackPlayer.java → src/main/java/io/zipcoder/casino/blackjackPlayer.java 查看文件

@@ -1,3 +1,5 @@
1
+package io.zipcoder.casino;
2
+
1 3
 public class blackjackPlayer {
2 4
 
3 5
     private double wager;

src/test/java/io/zipcoder/casino/DealerTest.java → src/test/java/io/zipcoder/casino/BlackjackDealerTest.java 查看文件

@@ -2,7 +2,7 @@ package io.zipcoder.casino;
2 2
 
3 3
 import org.junit.Test;
4 4
 
5
-public class DealerTest {
5
+public class BlackjackDealerTest {
6 6
 
7 7
     @Test
8 8
     public void testDealCard(){