瀏覽代碼

Merge branch 'Working' into Blackjack

ThuyKhong 6 年之前
父節點
當前提交
cec6afab52
共有 1 個文件被更改,包括 15 次插入4 次删除
  1. 15
    4
      src/main/java/io/zipcoder/casino/cardgames/cards/CardSuit.java

+ 15
- 4
src/main/java/io/zipcoder/casino/cardgames/cards/CardSuit.java 查看文件

@@ -1,8 +1,19 @@
1 1
 package io.zipcoder.casino.cardgames.cards;
2 2
 
3 3
 public enum CardSuit {
4
-    HEARTS,
5
-    SPADES,
6
-    CLUBS,
7
-    DIAMONDS
4
+    HEARTS('♥'),
5
+    SPADES('♠'),
6
+    CLUBS('♣'),
7
+    DIAMONDS('♦');
8
+
9
+    private char cardGraphic;
10
+
11
+    CardSuit (char cardGraphic) {
12
+        this.cardGraphic = cardGraphic;
13
+    }
14
+
15
+    public char getCardGraphic() {
16
+        return cardGraphic;
17
+    }
18
+
8 19
 }