소스 검색

Merge branch 'dev' into HigherCards

Aleena Rose-Mathew 6 년 전
부모
커밋
340f99d86b
2개의 변경된 파일168개의 추가작업 그리고 177개의 파일을 삭제
  1. 57
    153
      src/main/java/io/zipcoder/casino/Leviathan/Games/Yahtzee.java
  2. 111
    24
      src/test/java/io/zipcoder/casino/YahtzeeTest.java

+ 57
- 153
src/main/java/io/zipcoder/casino/Leviathan/Games/Yahtzee.java 파일 보기

30
     //==================================================================================
30
     //==================================================================================
31
     // PLAY GAME METHOD
31
     // PLAY GAME METHOD
32
     //==================================================================================
32
     //==================================================================================
33
-
34
     public void playGame() {
33
     public void playGame() {
35
         printWelcomeMessage();
34
         printWelcomeMessage();
36
         while (playAgain) {
35
         while (playAgain) {
55
     // SCORE SHEET METHODS
54
     // SCORE SHEET METHODS
56
     //==================================================================================
55
     //==================================================================================
57
 
56
 
58
-    /*
59
-    Check score sheet for completion
60
-     */
57
+    //Check score sheet for completion
61
     private boolean checkScoreSheetForCompletion() {
58
     private boolean checkScoreSheetForCompletion() {
62
         for (Map.Entry<YahtzeeField, Integer> entry : scoreSheet.entrySet()) {
59
         for (Map.Entry<YahtzeeField, Integer> entry : scoreSheet.entrySet()) {
63
             Integer value = entry.getValue();
60
             Integer value = entry.getValue();
68
         return true;
65
         return true;
69
     }
66
     }
70
 
67
 
71
-    /*
72
-    Get total score
73
-     */
68
+    //Get total score
74
     private int getTotalScore() {
69
     private int getTotalScore() {
75
         int sumOfUpperSection = getUpperSectionScore();
70
         int sumOfUpperSection = getUpperSectionScore();
76
         int bonus = 0;
71
         int bonus = 0;
81
         return sumOfUpperSection + bonus + sumOfLowerSection;
76
         return sumOfUpperSection + bonus + sumOfLowerSection;
82
     }
77
     }
83
 
78
 
84
-    /*
85
-    Get upper section score
86
-     */
79
+    //Get upper section score
87
     private int getUpperSectionScore() {
80
     private int getUpperSectionScore() {
88
         int upperScore = 0;
81
         int upperScore = 0;
89
         Iterator it = scoreSheet.entrySet().iterator();
82
         Iterator it = scoreSheet.entrySet().iterator();
98
         return upperScore;
91
         return upperScore;
99
     }
92
     }
100
 
93
 
101
-    /*
102
-    Get lower section score
103
-     */
94
+    //Get lower section score
104
     private int getLowerSectionScore() {
95
     private int getLowerSectionScore() {
105
         int lowerScore = 0;
96
         int lowerScore = 0;
106
         Iterator it = scoreSheet.entrySet().iterator();
97
         Iterator it = scoreSheet.entrySet().iterator();
116
         return lowerScore;
107
         return lowerScore;
117
     }
108
     }
118
 
109
 
119
-
120
     //==================================================================================
110
     //==================================================================================
121
     // SCORING ROLL METHODS
111
     // SCORING ROLL METHODS
122
     //==================================================================================
112
     //==================================================================================
123
 
113
 
124
-    /*
125
-    Score roll
126
-     */
114
+    //Score roll
127
     public void scoreRoll() {
115
     public void scoreRoll() {
128
         YahtzeeField fieldChoice = chooseYahtzeeField();
116
         YahtzeeField fieldChoice = chooseYahtzeeField();
129
         int score = scoreDice(fieldChoice);
117
         int score = scoreDice(fieldChoice);
130
         updateScoreSheet(fieldChoice, score);
118
         updateScoreSheet(fieldChoice, score);
131
     }
119
     }
132
 
120
 
133
-    /*
134
-    Choose yahtzee field to score
135
-     */
121
+    //Convert user input into yahtzee field to score
136
     public YahtzeeField chooseYahtzeeField() {
122
     public YahtzeeField chooseYahtzeeField() {
137
         String userInput = userInputFieldToScore();
123
         String userInput = userInputFieldToScore();
138
         while (!isValidYahtzeeField(userInput)) {
124
         while (!isValidYahtzeeField(userInput)) {
142
         return YahtzeeField.valueOf(userInput);
128
         return YahtzeeField.valueOf(userInput);
143
     }
129
     }
144
 
130
 
145
-    /*
146
-    Check if yahtzee field is valid and free
147
-     */
131
+    //Check if yahtzee field is valid and free
148
     public boolean isValidYahtzeeField(String userInput) {
132
     public boolean isValidYahtzeeField(String userInput) {
149
         for (YahtzeeField aYahtzeeField : YahtzeeField.values()) {
133
         for (YahtzeeField aYahtzeeField : YahtzeeField.values()) {
150
             if (aYahtzeeField.toString().equals(userInput)) {
134
             if (aYahtzeeField.toString().equals(userInput)) {
156
         return false;
140
         return false;
157
     }
141
     }
158
 
142
 
159
-    /*
160
-    Score dice
161
-    */
143
+    //Score dice
162
     private int scoreDice(YahtzeeField yahtzeeField) {
144
     private int scoreDice(YahtzeeField yahtzeeField) {
163
         setDiceValueCounts();
145
         setDiceValueCounts();
164
         int score = 0;
146
         int score = 0;
206
         return score;
188
         return score;
207
     }
189
     }
208
 
190
 
209
-    /*
210
-    Score dice "count" fields: aces, twos, threes, fours, fives, or sixes
211
-    */
191
+    //Score dice "count" fields: aces, twos, threes, fours, fives, or sixes
212
     public int scoreCountFields(int countField) {
192
     public int scoreCountFields(int countField) {
213
         return diceValueCounts[countField - 1] * countField;
193
         return diceValueCounts[countField - 1] * countField;
214
     }
194
     }
215
 
195
 
216
-    /*
217
-    Check "of a kind" criteria is met: 3/4 of a kind, chance, yahtzee
218
-    */
196
+    //Check "of a kind" criteria is met: 3/4 of a kind, chance, yahtzee
219
     public boolean ofAKindCriteria(int ofAKind) {
197
     public boolean ofAKindCriteria(int ofAKind) {
220
         for (int count : diceValueCounts) {
198
         for (int count : diceValueCounts) {
221
             if (count >= ofAKind) {
199
             if (count >= ofAKind) {
225
         return false;
203
         return false;
226
     }
204
     }
227
 
205
 
228
-    /*
229
-    Score dice 3/4 of a kind, or chance
230
-    */
206
+    //Score dice 3/4 of a kind, or chance
231
     public int scoreOfAKind(boolean meetsOfAKindCriteria) {
207
     public int scoreOfAKind(boolean meetsOfAKindCriteria) {
232
         int score = 0;
208
         int score = 0;
233
         if (meetsOfAKindCriteria) {
209
         if (meetsOfAKindCriteria) {
234
-            for (Die d : dice) {
235
-                score += d.getValue();
236
-            }
210
+            score = sumOfDice();
237
         }
211
         }
238
         return score;
212
         return score;
239
     }
213
     }
240
 
214
 
241
-    /*
242
-    Score yahtzee
243
-     */
244
-    private int scoreYahtzee(boolean meetsOfAKindCriteria) {
215
+    //Get sum of dice
216
+    public int sumOfDice(){
217
+        int sum = 0;
218
+        for (Die d : dice) {
219
+            sum += d.getValue();
220
+        }
221
+        return sum;
222
+    }
223
+
224
+    //Score yahtzee
225
+    public int scoreYahtzee(boolean meetsOfAKindCriteria) {
245
         int score = 0;
226
         int score = 0;
246
         if (meetsOfAKindCriteria) {
227
         if (meetsOfAKindCriteria) {
247
             score = 50;
228
             score = 50;
249
         return score;
230
         return score;
250
     }
231
     }
251
 
232
 
252
-    /*
253
-    Check Full House criteria is met
254
-    */
233
+    //Check Full House criteria is met
255
     public boolean fullHouseCriteria() {
234
     public boolean fullHouseCriteria() {
256
         int i = 0;
235
         int i = 0;
257
         for (int count : diceValueCounts) {
236
         for (int count : diceValueCounts) {
265
         return false;
244
         return false;
266
     }
245
     }
267
 
246
 
268
-    /*
269
-    Score Full House
270
-     */
247
+    //Score Full House
271
     public int scoreFullHouse(boolean meetsFullHouseCriteria) {
248
     public int scoreFullHouse(boolean meetsFullHouseCriteria) {
272
         int score = 0;
249
         int score = 0;
273
         if (meetsFullHouseCriteria) {
250
         if (meetsFullHouseCriteria) {
276
         return score;
253
         return score;
277
     }
254
     }
278
 
255
 
279
-    /*
280
-    Check Small Straight criteria is met
281
-    */
256
+    //Check Small Straight criteria is met
282
     public boolean smStraightCriteria() {
257
     public boolean smStraightCriteria() {
283
         boolean meetsCriteria = false;
258
         boolean meetsCriteria = false;
284
         int i = 0;
259
         int i = 0;
293
         return meetsCriteria;
268
         return meetsCriteria;
294
     }
269
     }
295
 
270
 
296
-    /*
297
-    Score SM Straight
298
-     */
299
-    private int scoreSmStraight(boolean meetsSmStraightCriteria) {
271
+    //Score SM Straight
272
+    public int scoreSmStraight(boolean meetsSmStraightCriteria) {
300
         int score = 0;
273
         int score = 0;
301
         if (meetsSmStraightCriteria) {
274
         if (meetsSmStraightCriteria) {
302
             score = 30;
275
             score = 30;
304
         return score;
277
         return score;
305
     }
278
     }
306
 
279
 
307
-    /*
308
-    Check Large Straight criteria is met
309
-    */
280
+    //Check Large Straight criteria is met
310
     public boolean lgStraightCriteria() {
281
     public boolean lgStraightCriteria() {
311
         boolean meetsCriteria = false;
282
         boolean meetsCriteria = false;
312
         int i = 0;
283
         int i = 0;
321
         return meetsCriteria;
292
         return meetsCriteria;
322
     }
293
     }
323
 
294
 
324
-    /*
325
-    Score LG Straight
326
-     */
295
+    //Score LG Straight
327
     public int scoreLgStraight(boolean meetsLgStraightCriteria) {
296
     public int scoreLgStraight(boolean meetsLgStraightCriteria) {
328
         int score = 0;
297
         int score = 0;
329
         if (meetsLgStraightCriteria) {
298
         if (meetsLgStraightCriteria) {
336
     // ROLLING DICE METHODS
305
     // ROLLING DICE METHODS
337
     //==================================================================================
306
     //==================================================================================
338
 
307
 
339
-    /*
340
-    Allow the user to roll again up to 2 more times
341
-     */
308
+    //Allow the user to roll again up to 2 more times
342
     public void rollAgainLoop() {
309
     public void rollAgainLoop() {
343
         boolean rollAgain = userInputYesNoToBoolean(userInputRollAgain());
310
         boolean rollAgain = userInputYesNoToBoolean(userInputRollAgain());
344
         int rollCounter = 1;
311
         int rollCounter = 1;
353
         }
320
         }
354
     }
321
     }
355
 
322
 
356
-    /*
357
-    Roll again
358
-     */
323
+    //Roll again
359
     public void rollAgain() {
324
     public void rollAgain() {
360
         List<Integer> diceToRollAgainList = userInputChooseDice();
325
         List<Integer> diceToRollAgainList = userInputChooseDice();
361
         Integer[] diceToRollAgain = turnRollAgainListToArray(diceToRollAgainList);
326
         Integer[] diceToRollAgain = turnRollAgainListToArray(diceToRollAgainList);
362
         rollSelectedDiceAgain(diceToRollAgain);
327
         rollSelectedDiceAgain(diceToRollAgain);
363
     }
328
     }
364
 
329
 
365
-    /*
366
-    Ask user to select which dice to roll again
367
-     */
330
+    //Ask user to select which dice to roll again
368
     public List<Integer> userInputChooseDice() {
331
     public List<Integer> userInputChooseDice() {
369
         List<Integer> diceToRollAgainList = new ArrayList<Integer>();
332
         List<Integer> diceToRollAgainList = new ArrayList<Integer>();
370
         boolean stillSelecting = true;
333
         boolean stillSelecting = true;
383
         return diceToRollAgainList;
346
         return diceToRollAgainList;
384
     }
347
     }
385
 
348
 
386
-    /*
387
-    Turn user input of dice to roll again into an array
388
-     */
349
+    //Turn user input of dice to roll again into an array
389
     public Integer[] turnRollAgainListToArray(List<Integer> diceToRollAgainList) {
350
     public Integer[] turnRollAgainListToArray(List<Integer> diceToRollAgainList) {
390
         Integer[] diceToRollAgainArray = null;
351
         Integer[] diceToRollAgainArray = null;
391
         diceToRollAgainArray = diceToRollAgainList.toArray(new Integer[0]);
352
         diceToRollAgainArray = diceToRollAgainList.toArray(new Integer[0]);
392
         return diceToRollAgainArray;
353
         return diceToRollAgainArray;
393
     }
354
     }
394
 
355
 
395
-    /*
396
-    Roll the selected dice again
397
-     */
356
+    //Roll the selected dice again
398
     public void rollSelectedDiceAgain(Integer... diceToRollAgain) {
357
     public void rollSelectedDiceAgain(Integer... diceToRollAgain) {
399
         for (int i = 0; i < diceToRollAgain.length; i++) {
358
         for (int i = 0; i < diceToRollAgain.length; i++) {
400
             dice[diceToRollAgain[i] - 1].rollADice();
359
             dice[diceToRollAgain[i] - 1].rollADice();
402
     }
361
     }
403
 
362
 
404
     //==================================================================================
363
     //==================================================================================
405
-    // Get User Input
364
+    // Console Methods Input
406
     //==================================================================================
365
     //==================================================================================
407
 
366
 
408
-    /*
409
-    Ask user if they want to roll again
410
-     */
367
+    //Ask user if they want to roll again
411
     public String userInputRollAgain() {
368
     public String userInputRollAgain() {
412
         return aConsole.yesOrNo("Roll again?");
369
         return aConsole.yesOrNo("Roll again?");
413
     }
370
     }
414
 
371
 
415
-    /*
416
-    Ask user the position of the dice that they want to roll again
417
-     */
372
+    //Ask user the position of the dice that they want to roll again
418
     public String userInputDiceToRollAgain() {
373
     public String userInputDiceToRollAgain() {
419
      return aConsole.getStringInput("Enter position of dice to roll again or enter to perform roll");
374
      return aConsole.getStringInput("Enter position of dice to roll again or enter to perform roll");
420
     }
375
     }
421
 
376
 
422
-    /*
423
-    Ask user which field they want to score
424
-     */
377
+    //Ask user which field they want to score
425
     public String userInputFieldToScore() {
378
     public String userInputFieldToScore() {
426
         return aConsole.getStringInput("Which field do you want to score?").toUpperCase();
379
         return aConsole.getStringInput("Which field do you want to score?").toUpperCase();
427
     }
380
     }
428
 
381
 
429
-    /*
430
-    Ask user if they want to play again
431
-     */
382
+    //Ask user if they want to play again
432
     public String userInputPlayAgain(){
383
     public String userInputPlayAgain(){
433
         return aConsole.yesOrNo("Would you like to play again?");
384
         return aConsole.yesOrNo("Would you like to play again?");
434
     }
385
     }
435
 
386
 
436
-    /*
437
-    Convert user input to boolean
438
-     */
387
+    //Convert user input to boolean
439
     public boolean userInputYesNoToBoolean(String userInputString) {
388
     public boolean userInputYesNoToBoolean(String userInputString) {
440
         return (userInputString.toUpperCase().equals("YES"));
389
         return (userInputString.toUpperCase().equals("YES"));
441
     }
390
     }
442
 
391
 
443
     //==================================================================================
392
     //==================================================================================
444
-    // Print Output
393
+    // Console Methods Output
445
     //==================================================================================
394
     //==================================================================================
446
 
395
 
447
-    /*
448
-    Print dice
449
-     */
396
+    //Print dice
450
     public void printDice() {
397
     public void printDice() {
451
         DrawYahtzeeDice diceDrawer = new DrawYahtzeeDice();
398
         DrawYahtzeeDice diceDrawer = new DrawYahtzeeDice();
452
         setDiceValues();
399
         setDiceValues();
454
         aConsole.println("    1           2           3           4           5    ");
401
         aConsole.println("    1           2           3           4           5    ");
455
     }
402
     }
456
 
403
 
457
-    /*
458
-    Print welcome message
459
-     */
404
+    //Print welcome message
460
     public void printWelcomeMessage() {
405
     public void printWelcomeMessage() {
461
         aConsole.println("Welcome to Yahtzee " + aPlayer.getName());
406
         aConsole.println("Welcome to Yahtzee " + aPlayer.getName());
462
         printRules();
407
         printRules();
463
     }
408
     }
464
 
409
 
465
-    /*
466
-    Print rules
467
-    */
410
+    //Print rules
468
     public void printRules() {
411
     public void printRules() {
469
         aConsole.println("Roll 5 dice up to 3 times and try to get the highest score");
412
         aConsole.println("Roll 5 dice up to 3 times and try to get the highest score");
470
     }
413
     }
471
 
414
 
472
-    /*
473
-    Print score sheet
474
-     */
415
+    //Print score sheet
475
     private void printScoreSheet() {
416
     private void printScoreSheet() {
476
         aConsole.println("Scoresheet: " + scoreSheet.toString());
417
         aConsole.println("Scoresheet: " + scoreSheet.toString());
477
     }
418
     }
478
 
419
 
479
-    /*
480
-    Print end of game stats
481
-    */
420
+    //Print end of game stats
482
     public void printEndOfGameMessage(int totalScore) {
421
     public void printEndOfGameMessage(int totalScore) {
483
         aConsole.println("Game over!");
422
         aConsole.println("Game over!");
484
         aConsole.println("Your total score is: " + totalScore);
423
         aConsole.println("Your total score is: " + totalScore);
485
     }
424
     }
486
 
425
 
487
-    /*
488
-    Print error when yahtzee field input is invalid or already full
489
-     */
426
+    //Print error when yahtzee field input is invalid or already full
490
     public void printYahtzeeFieldErrorMessage() {
427
     public void printYahtzeeFieldErrorMessage() {
491
         aConsole.println("please enter valid & free yahtzee field.");
428
         aConsole.println("please enter valid & free yahtzee field.");
492
     }
429
     }
493
 
430
 
494
-    /*
495
-    Print error when user enters dice to roll outside of 1-5 bounds
496
-     */
431
+    //Print error when user enters dice to roll outside of 1-5 bounds
497
     public void printDicePositionErrorMessage() {
432
     public void printDicePositionErrorMessage() {
498
         aConsole.println("Enter a number between 1 and 5 or enter to roll");
433
         aConsole.println("Enter a number between 1 and 5 or enter to roll");
499
     }
434
     }
502
     // Getters and Setters (and Re-setters)
437
     // Getters and Setters (and Re-setters)
503
     //==================================================================================
438
     //==================================================================================
504
 
439
 
505
-    /*
506
-    Set dice (roll all dice)
507
-     */
440
+    //Set dice (roll all dice)
508
     public void rollDice() {
441
     public void rollDice() {
509
         dice = diceRoller.rollAll();
442
         dice = diceRoller.rollAll();
510
     }
443
     }
511
 
444
 
512
-    /*
513
-    Get dice
514
-     */
515
-    public Die[] getDice(){
516
-        return this.dice;
517
-    }
518
-
519
-
520
-    /*
521
-    Set value count array
522
-    */
445
+    //Set value count array
523
     public void setDiceValueCounts() {
446
     public void setDiceValueCounts() {
524
         resetDiceValueCounts();
447
         resetDiceValueCounts();
525
         for (Die d : dice) {
448
         for (Die d : dice) {
527
         }
450
         }
528
     }
451
     }
529
 
452
 
530
-    /*
531
-    Reset count of each value in dice
532
-    */
453
+    //Reset count of each value in dice
533
     public void resetDiceValueCounts() {
454
     public void resetDiceValueCounts() {
534
         for (int i = 0; i < diceValueCounts.length; i++) {
455
         for (int i = 0; i < diceValueCounts.length; i++) {
535
             diceValueCounts[i] = 0;
456
             diceValueCounts[i] = 0;
536
         }
457
         }
537
     }
458
     }
538
 
459
 
539
-    /*
540
-    Get value count array
541
-     */
460
+    //Get value count array
542
     public int[] getDiceValueCounts() {
461
     public int[] getDiceValueCounts() {
543
         return this.diceValueCounts;
462
         return this.diceValueCounts;
544
     }
463
     }
545
 
464
 
546
-    /*
547
-    Set dice values array
548
-     */
465
+    //Set dice values array
549
     public void setDiceValues() {
466
     public void setDiceValues() {
550
         for (int i = 0; i < dice.length; i++) {
467
         for (int i = 0; i < dice.length; i++) {
551
             diceValues[i] = (dice[i].getValue());
468
             diceValues[i] = (dice[i].getValue());
552
         }
469
         }
553
     }
470
     }
554
 
471
 
555
-    /*
556
-    Get dice values array
557
-     */
558
-    public int[] getDiceValues() {
559
-        return this.diceValues;
560
-    }
561
-
562
-    /*
563
-    Set score sheet with scored value
564
-    */
472
+    //Set score sheet with scored value
565
     public void updateScoreSheet(YahtzeeField yahtzeeField, int score) {
473
     public void updateScoreSheet(YahtzeeField yahtzeeField, int score) {
566
         scoreSheet.put(yahtzeeField, score);
474
         scoreSheet.put(yahtzeeField, score);
567
     }
475
     }
568
 
476
 
569
-    /*
570
-    Reset score sheet to blank
571
-     */
477
+    //Reset score sheet to blank
572
     public void createBlankScoreSheet() {
478
     public void createBlankScoreSheet() {
573
         for (YahtzeeField field : YahtzeeField.values()) {
479
         for (YahtzeeField field : YahtzeeField.values()) {
574
             scoreSheet.put(field, null);
480
             scoreSheet.put(field, null);
575
         }
481
         }
576
     }
482
     }
577
 
483
 
578
-    /*
579
-    Get score sheet
580
-     */
484
+    //Get score sheet
581
     public Map<YahtzeeField, Integer> getScoreSheet() {
485
     public Map<YahtzeeField, Integer> getScoreSheet() {
582
         return this.scoreSheet;
486
         return this.scoreSheet;
583
     }
487
     }

+ 111
- 24
src/test/java/io/zipcoder/casino/YahtzeeTest.java 파일 보기

19
     }
19
     }
20
 
20
 
21
     @Test
21
     @Test
22
-    public void getDiceValuesTest(){
23
-//        //Given
24
-//        Die testDie = new Die();
25
-//        testDie.rollADice();
26
-//        Die[] testDieArray = {testDie, testDie, testDie, testDie, testDie};
27
-//        int testDieValue = testDie.getValue();
28
-//        int[] expectedArray = {testDieValue, testDieValue, testDieValue, testDieValue, testDieValue};
29
-//        //Actual
30
-//        boolean actual = Arrays.equals(actualArray, expectedArray);
31
-//        //Expected
32
-//        boolean expected = true;
33
-//        //Test
34
-//        assertEquals(expected, actual);
35
-    }
36
-
37
-    @Test
38
-    public void rollSelectedDiceAgainTest(){
39
-        //Given
22
+    public void scoreCountFieldsTestPositive(){
23
+        //Actual
24
+        int actual = yahtzee.scoreCountFields(2);
25
+        //Expected
26
+        int[] getDiceValueCounts = yahtzee.getDiceValueCounts();
27
+        int expected = getDiceValueCounts[1]*2;
28
+        //Test
29
+        assertEquals(expected, actual);
30
+    }
40
 
31
 
41
-        yahtzee.rollSelectedDiceAgain(1,2,3,4,5);
32
+    @Test
33
+    public void scoreThreeOfAKindTestPositive(){
42
         //Actual
34
         //Actual
35
+        int actual = yahtzee.scoreOfAKind(true);
36
+        //Expected
37
+        int expected = yahtzee.sumOfDice();
38
+        //Test
39
+        assertEquals(expected, actual);
40
+    }
43
 
41
 
42
+    @Test
43
+    public void scoreThreeOfAKindTestNegative(){
44
+        //Actual
45
+        int actual = yahtzee.scoreOfAKind(false);
46
+        //Expected
47
+        int expected = 0;
48
+        //Test
49
+        assertEquals(expected, actual);
50
+    }
51
+
52
+    @Test
53
+    public void scoreYahtzeeTestPositive(){
54
+        //Actual
55
+        int actual = yahtzee.scoreYahtzee(true);
56
+        //Expected
57
+        int expected = 50;
58
+        //Test
59
+        assertEquals(expected, actual);
60
+    }
61
+
62
+    @Test
63
+    public void scoreYahtzeeTestNegative(){
64
+        //Actual
65
+        int actual = yahtzee.scoreYahtzee(false);
66
+        //Expected
67
+        int expected = 0;
68
+        //Test
69
+        assertEquals(expected, actual);
70
+    }
71
+
72
+    @Test
73
+    public void scoreFullHouseTestPositive(){
74
+        //Actual
75
+        int actual = yahtzee.scoreFullHouse(true);
76
+        //Expected
77
+        int expected = 25;
78
+        //Test
79
+        assertEquals(expected, actual);
44
     }
80
     }
45
 
81
 
46
     @Test
82
     @Test
47
-    public void turnTurnRollAgainListToArray(){
83
+    public void scoreFullHouseTestNegative(){
84
+        //Actual
85
+        int actual = yahtzee.scoreFullHouse(false);
86
+        //Expected
87
+        int expected = 0;
88
+        //Test
89
+        assertEquals(expected, actual);
90
+    }
91
+
92
+    @Test
93
+    public void scoreSmStraightTestPositive(){
94
+        //Actual
95
+        int actual = yahtzee.scoreSmStraight(true);
96
+        //Expected
97
+        int expected = 30;
98
+        //Test
99
+        assertEquals(expected, actual);
100
+    }
101
+
102
+    @Test
103
+    public void scoreSmStraightTestNegative(){
104
+        //Actual
105
+        int actual = yahtzee.scoreSmStraight(false);
106
+        //Expected
107
+        int expected = 0;
108
+        //Test
109
+        assertEquals(expected, actual);
110
+    }
111
+
112
+    @Test
113
+    public void scoreLgStraightTestPositive(){
114
+        //Actual
115
+        int actual = yahtzee.scoreLgStraight(true);
116
+        //Expected
117
+        int expected = 40;
118
+        //Test
119
+        assertEquals(expected, actual);
120
+    }
121
+
122
+    @Test
123
+    public void scoreLgStraightTestNegative(){
124
+        //Actual
125
+        int actual = yahtzee.scoreLgStraight(false);
126
+        //Expected
127
+        int expected = 0;
128
+        //Test
129
+        assertEquals(expected, actual);
130
+    }
131
+
132
+
133
+    @Test
134
+    public void turnTurnRollAgainListToArrayTest(){
48
         //Given
135
         //Given
49
         List<Integer> testUserInputList = new ArrayList<Integer>();
136
         List<Integer> testUserInputList = new ArrayList<Integer>();
50
         testUserInputList.add(1);
137
         testUserInputList.add(1);
59
     }
146
     }
60
 
147
 
61
     @Test
148
     @Test
62
-    public void userInputRollAgainBooleanTestYes(){
149
+    public void userInputRollAgainBooleanTestPositive(){
63
         //Actual
150
         //Actual
64
         boolean actual = yahtzee.userInputYesNoToBoolean("YES");
151
         boolean actual = yahtzee.userInputYesNoToBoolean("YES");
65
         //Expected
152
         //Expected
68
     }
155
     }
69
 
156
 
70
     @Test
157
     @Test
71
-    public void userInputRollAgainBooleanTestNo(){
158
+    public void userInputRollAgainBooleanTestNegative(){
72
         //Actual
159
         //Actual
73
         boolean actual = yahtzee.userInputYesNoToBoolean("NO");
160
         boolean actual = yahtzee.userInputYesNoToBoolean("NO");
74
         //Expected
161
         //Expected
77
     }
164
     }
78
 
165
 
79
     @Test
166
     @Test
80
-    public void isYahtzeeFieldValidTest(){
167
+    public void isYahtzeeFieldValidTestPositive(){
81
         //Actual
168
         //Actual
82
         boolean actual = yahtzee.isValidYahtzeeField("ACES");
169
         boolean actual = yahtzee.isValidYahtzeeField("ACES");
83
         //Expected
170
         //Expected
87
     }
174
     }
88
 
175
 
89
     @Test
176
     @Test
90
-    public void isYahtzeeFieldValidTest2(){
177
+    public void isYahtzeeFieldValidTestNegative(){
91
         //Actual
178
         //Actual
92
         boolean actual = yahtzee.isValidYahtzeeField("ONES");
179
         boolean actual = yahtzee.isValidYahtzeeField("ONES");
93
         //Expected
180
         //Expected