File tree Expand file tree Collapse file tree 2 files changed +2
-20
lines changed
lesson_16/objects/objects_app
src/main/java/com/codedifferently/lesson16/ShawnDunsmore Expand file tree Collapse file tree 2 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ tasks.named<Test>("test") {
43
43
tasks.jacocoTestReport {
44
44
dependsOn(tasks.test)
45
45
reports {
46
- xml.required = true
46
+ xml.required.set(true )
47
+
47
48
}
48
49
}
49
50
Original file line number Diff line number Diff line change 1
1
package com .codedifferently .lesson16 .ShawnDunsmore ;
2
2
3
3
import java .util .ArrayList ;
4
- import java .util .Collections ;
5
4
6
5
public class SlotMachine {
7
6
private int numOfSlots ;
@@ -57,24 +56,6 @@ public int payOut() {
57
56
return payAmount ;
58
57
}
59
58
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
- }
78
59
79
60
public int getMoneyNeeded () {
80
61
return moneyNeeded ;
You can’t perform that action at this time.
0 commit comments