Lauren Green 6 years ago
parent
commit
e0f20421f2
2 changed files with 12 additions and 1 deletions
  1. 1
    0
      .gitignore
  2. 11
    1
      src/main/java/io/zipcoder/casino/ScoreSheet.java

+ 1
- 0
.gitignore View File

9
 .settings/
9
 .settings/
10
 .loadpath
10
 .loadpath
11
 .recommenders
11
 .recommenders
12
+.DS_Store
12
 
13
 
13
 # External tool builders
14
 # External tool builders
14
 .externalToolBuilders/
15
 .externalToolBuilders/

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

2
 
2
 
3
 package io.zipcoder.casino;
3
 package io.zipcoder.casino;
4
 
4
 
5
+import com.sun.tools.javac.code.Attribute;
6
+
5
 import java.util.*;
7
 import java.util.*;
6
 
8
 
7
 public class ScoreSheet {
9
 public class ScoreSheet {
28
         return totalScore;
30
         return totalScore;
29
     }
31
     }
30
 
32
 
33
+    public void printRow(Enum row, String description) {
34
+        System.out.print(String.format("%-35s",description));
35
+        if(getScore(row) != null) {
36
+            System.out.println("** " + getScore(row) + " **");
37
+        } else {
38
+            System.out.println("** open **");
39
+        }
40
+    }
31
 
41
 
32
     public void printScoreCard(){
42
     public void printScoreCard(){
33
         System.out.print(String.format("%-35s","1. Aces: Totals all Ones"));
43
         System.out.print(String.format("%-35s","1. Aces: Totals all Ones"));
275
     }
285
     }
276
 
286
 
277
     public Integer getScore(ROW row) {
287
     public Integer getScore(ROW row) {
278
-        return this.scores.get(row);
288
+        return scores.get(row);
279
     }
289
     }
280
 }
290
 }