瀏覽代碼

before the big merge

Akeem Cherry 6 年之前
父節點
當前提交
107290d996

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

@@ -1,11 +0,0 @@
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
- 28
src/main/java/io/zipcoder/casino/BlackjackPlayer.java 查看文件

@@ -1,28 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-public class BlackjackPlayer {
4
-
5
-    private double wager;
6
-
7
-    private double money;
8
-
9
-
10
-    public void blackjackPlayer(double money) {
11
-
12
-    }
13
-
14
-    public double setBet(double money) {
15
-
16
-        this.wager = money;
17
-
18
-        return money;
19
-    }
20
-
21
-    public double getBet(double money) {
22
-
23
-        this.wager = money;
24
-
25
-        return money;
26
-
27
-    }
28
-}

+ 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 player, double money){
9
-
10
-    }
11
-}

+ 0
- 34
src/main/java/io/zipcoder/casino/Hand.java 查看文件

@@ -1,34 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-import java.util.ArrayList;
4
-import java.util.List;
5
-
6
-public class Hand {
7
-    private  List<Card> cards;
8
-
9
-    public Hand () {
10
-
11
-
12
-        this.cards = new ArrayList<>();
13
-    }
14
-
15
-    public void add(Card card){
16
-
17
-        this.cards.add(card);
18
-    }
19
-
20
-    public Integer getHandValue(){
21
-
22
-        return null;
23
-    }
24
-
25
-    public List<Card> getCards() {
26
-
27
-        return cards;
28
-    }
29
-
30
-    public void setCards(List<Card> cards) {
31
-
32
-        this.cards = cards;
33
-    }
34
-}

+ 0
- 30
src/main/java/io/zipcoder/casino/Player.java 查看文件

@@ -1,30 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-import io.zipcoder.casino.Hand;
4
-
5
-public class Player {
6
-
7
-    private String name;
8
-
9
-    private Hand hand;
10
-
11
-    public Player() {
12
-
13
-        this.hand = new Hand();
14
-    }
15
-
16
-    public void addCard(Card card) {
17
-
18
-        hand.add(card);
19
-    }
20
-
21
-    public Hand getHand() {
22
-
23
-        return hand;
24
-    }
25
-
26
-    public void setHand(Hand hand) {
27
-
28
-        this.hand = hand;
29
-    }
30
-}

+ 0
- 40
src/test/java/blackjackPlayerTest.java 查看文件

@@ -1,40 +0,0 @@
1
-import io.zipcoder.casino.BlackjackPlayer;
2
-import org.junit.Assert;
3
-import org.junit.Test;
4
-
5
-public class blackjackPlayerTest {
6
-
7
-    @Test
8
-
9
-    public void setBet() {
10
-
11
-        //Given
12
-        BlackjackPlayer blackjackPlayer = new BlackjackPlayer();
13
-
14
-        //When
15
-        double expected = 100.00;
16
-
17
-        double actual = blackjackPlayer.setBet(100.00);
18
-
19
-        //Then
20
-        Assert.assertEquals(expected,actual, 0);
21
-
22
-    }
23
-
24
-    @Test
25
-
26
-    public void getBet() {
27
-
28
-        //Given
29
-        BlackjackPlayer blackjackPlayer = new BlackjackPlayer();
30
-
31
-        //When
32
-        double actual = 100.00;
33
-
34
-        double expected = blackjackPlayer.getBet(100.00);
35
-
36
-        //Then
37
-        Assert.assertEquals(expected,actual,0);
38
-
39
-    }
40
-}

+ 0
- 16
src/test/java/io/zipcoder/casino/BlackjackDealerTest.java 查看文件

@@ -1,16 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-import org.junit.Test;
4
-
5
-public class BlackjackDealerTest {
6
-
7
-    @Test
8
-    public void testDealCard(){
9
-
10
-    }
11
-
12
-    @Test
13
-    public void testTakeBet(){
14
-
15
-    }
16
-}

+ 0
- 16
src/test/java/io/zipcoder/casino/HandTest.java 查看文件

@@ -1,16 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-import org.junit.Test;
4
-
5
-public class HandTest {
6
-
7
-    @Test
8
-    public void testAdd(){
9
-
10
-    }
11
-
12
-    @Test
13
-    public void testGetValue(){
14
-
15
-    }
16
-}

+ 0
- 8
src/test/java/io/zipcoder/casino/playerTest.java 查看文件

@@ -1,8 +0,0 @@
1
-package io.zipcoder.casino;
2
-
3
-import org.junit.Test;
4
-
5
-@Test
6
-
7
-public class playerTest {
8
-}