Browse Source

setRow method written

Lauren Green 6 years ago
parent
commit
155881a102
1 changed files with 15 additions and 2 deletions
  1. 15
    2
      src/main/java/io/zipcoder/casino/ScoreSheet.java

+ 15
- 2
src/main/java/io/zipcoder/casino/ScoreSheet.java View File

47
 
47
 
48
     }
48
     }
49
 
49
 
50
-    public void setRow(ROW row){
50
+    public void setRow(ROW row, Dice[] cup){
51
 
51
 
52
         switch(row) {
52
         switch(row) {
53
             case ACES:
53
             case ACES:
54
+                scores.put(ROW.ACES, calculateScore(ROW.ACES, cup);
54
                 break;
55
                 break;
55
             case TWOS:
56
             case TWOS:
57
+                scores.put(ROW.TWOS, calculateScore(ROW.TWOS, cup);
56
                 break;
58
                 break;
57
             case THREES:
59
             case THREES:
60
+                scores.put(ROW.THREES, calculateScore(ROW.THREES, cup);
58
                 break;
61
                 break;
59
             case FOURS:
62
             case FOURS:
63
+                scores.put(ROW.FOURS, calculateScore(ROW.FOURS, cup);
60
                 break;
64
                 break;
61
             case FIVES:
65
             case FIVES:
66
+                scores.put(ROW.FIVES, calculateScore(ROW.FIVES, cup);
62
                 break;
67
                 break;
63
             case SIXES:
68
             case SIXES:
69
+                scores.put(ROW.SIXES, calculateScore(ROW.SIXES, cup);
64
                 break;
70
                 break;
65
             case THREEOFAKIND:
71
             case THREEOFAKIND:
72
+                scores.put(ROW.THREEOFAKIND, calculateScore(ROW.THREEOFAKIND, cup);
66
                 break;
73
                 break;
67
             case FOUROFAKIND:
74
             case FOUROFAKIND:
75
+                scores.put(ROW.FOUROFAKIND, calculateScore(ROW.FOUROFAKIND, cup);
68
                 break;
76
                 break;
69
             case FULLHOUSE:
77
             case FULLHOUSE:
78
+                scores.put(ROW.FULLHOUSE, calculateScore(ROW.FULLHOUSE, cup);
70
                 break;
79
                 break;
71
             case SMALLSTRAIGHT:
80
             case SMALLSTRAIGHT:
81
+                scores.put(ROW.SMALLSTRAIGHT, calculateScore(ROW.SMALLSTRAIGHT, cup);
72
                 break;
82
                 break;
73
             case LARGESTRAIGHT:
83
             case LARGESTRAIGHT:
84
+                scores.put(ROW.LARGESTRAIGHT, calculateScore(ROW.LARGESTRAIGHT, cup);
74
                 break;
85
                 break;
75
             case YAHTZEE:
86
             case YAHTZEE:
87
+                scores.put(ROW.YAHTZEE, calculateScore(ROW.YAHTZEE, cup);
76
                 break;
88
                 break;
77
             case CHANCE:
89
             case CHANCE:
90
+                scores.put(ROW.CHANCE, calculateScore(ROW.CHANCE, cup);
78
                 break;
91
                 break;
79
         }
92
         }
80
 
93
 
81
     }
94
     }
82
 
95
 
83
-    public void calculateScore(ROW row, int value){
96
+    public void calculateScore(ROW row, Dice[] cup){
84
 
97
 
85
     }
98
     }
86
 }
99
 }