Skip to content

Commit

Permalink
added fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhiircv committed Nov 28, 2024
1 parent 80e6bee commit 9796d10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/Lottery.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Random;

public class Lottery {
ColorSupplier supplier = new ColorSupplier();
private final ColorSupplier colorSupplier = new ColorSupplier();

public int getRandomInt() {
Random random = new Random();
Expand All @@ -13,7 +13,7 @@ public int getRandomInt() {

public Ball getRandomBall() {
Ball randomBall = new Ball();
randomBall.setColor(supplier.getRandomColor());
randomBall.setColor(colorSupplier.getRandomColor());
randomBall.setNumber(getRandomInt());
return randomBall;
}
Expand Down

0 comments on commit 9796d10

Please sign in to comment.