Skip to content

Commit

Permalink
refactor: 변수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
seong-wooo committed Mar 28, 2023
1 parent a308695 commit 8307281
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/lotto/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public static void main(String[] args) {
final int lottoCount = money.getLottoCount();
System.out.println(String.format("\n%d개를 구매했습니다.", lottoCount));

final List<Lotto> autoLottos = getAutoLottos(lottoCount);
autoLottos.forEach(System.out::println);
final List<Lotto> lottos = getAutoLottos(lottoCount);
lottos.forEach(System.out::println);

System.out.println("\n당첨 번호를 입력해 주세요.");
final Lotto winLotto = new Lotto(InputView.requestWinNumbers());
Expand All @@ -32,7 +32,7 @@ public static void main(String[] args) {
int bonusBall = InputView.requestInteger();

final WinNumbers winNumbers = new WinNumbers(winLotto, bonusBall);
final LottoRanks lottoRanks = getLottoRanks(autoLottos, winNumbers);
final LottoRanks lottoRanks = getLottoRanks(lottos, winNumbers);

System.out.println("당첨 통계\n---");
System.out.println(lottoRanks);
Expand All @@ -45,8 +45,8 @@ private static List<Lotto> getAutoLottos(int lottoCount) {
.collect(Collectors.toList());
}

private static LottoRanks getLottoRanks(List<Lotto> autoLottos, WinNumbers winNumbers) {
final List<LottoRank> ranks = autoLottos.stream()
private static LottoRanks getLottoRanks(List<Lotto> lottos, WinNumbers winNumbers) {
final List<LottoRank> ranks = lottos.stream()
.map(lotto -> LottoRank.calculateRank(winNumbers, lotto))
.collect(Collectors.toList());

Expand Down

0 comments on commit 8307281

Please sign in to comment.