Skip to content

Commit

Permalink
refactor: 부적절한 파라미터명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yoondgu committed Feb 24, 2023
1 parent 0a6ab05 commit 9b12b47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/laddergame/view/util/LadderResultFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ private static int computePointWidth(List<String> players, List<String> results)
return Math.max(computeWordMaxLength(players), computeWordMaxLength(results));
}

private static int computeWordMaxLength(List<String> players) {
return players.stream()
private static int computeWordMaxLength(List<String> words) {
return words.stream()
.map(String::length)
.max(Integer::compareTo)
.orElseThrow(() -> new IllegalArgumentException("게임 참여자 정보가 존재하지 않습니다."));
.orElseThrow(() -> new IllegalArgumentException("변환할 단어가 존재하지 않습니다."));
}

private static String extractWords(List<String> players, int pointWidth) {
Expand Down

0 comments on commit 9b12b47

Please sign in to comment.