Skip to content

Commit 531ea2a

Browse files
committed
Feat: Adds Shawn Dunsmore Jr lesson 16 91 Percent Coverage
1 parent 24359c0 commit 531ea2a

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

lesson_16/objects/objects_app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ tasks.named<Test>("test") {
4343
tasks.jacocoTestReport {
4444
dependsOn(tasks.test)
4545
reports {
46-
xml.required = true
46+
xml.required.set(true)
47+
4748
}
4849
}
4950

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/ShawnDunsmore/SlotMachine.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.codedifferently.lesson16.ShawnDunsmore;
22

33
import java.util.ArrayList;
4-
import java.util.Collections;
54

65
public class SlotMachine {
76
private int numOfSlots;
@@ -57,24 +56,6 @@ public int payOut() {
5756
return payAmount;
5857
}
5958

60-
public ArrayList<String> spin(int money) throws InvalidPayAmountException {
61-
if (money < moneyNeeded) {
62-
throw new InvalidPayAmountException("Amount inavalid");
63-
}
64-
Collections.shuffle(iconList);
65-
return iconList;
66-
}
67-
68-
public ArrayList<String> spin(int money, int numOfSpins) throws InvalidPayAmountException {
69-
if (money < moneyNeeded) {
70-
throw new InvalidPayAmountException("Amount inavalid");
71-
}
72-
for (int i = 0; i < numOfSpins; i++) {
73-
Collections.shuffle(iconList);
74-
}
75-
76-
return iconList;
77-
}
7859

7960
public int getMoneyNeeded() {
8061
return moneyNeeded;

0 commit comments

Comments
 (0)