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") {
4343tasks.jacocoTestReport {
4444 dependsOn(tasks.test)
4545 reports {
46- xml.required = true
46+ xml.required.set(true )
47+
4748 }
4849}
4950
Original file line number Diff line number Diff line change 11package com .codedifferently .lesson16 .ShawnDunsmore ;
22
33import java .util .ArrayList ;
4- import java .util .Collections ;
54
65public 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 ;
You can’t perform that action at this time.
0 commit comments