-
Notifications
You must be signed in to change notification settings - Fork 843
[로또 ] 미션 제출합니다. #830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shlish95
wants to merge
22
commits into
woowacourse-precourse:main
Choose a base branch
from
shlish95:feature/lotto
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[로또 ] 미션 제출합니다. #830
+803
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
로또(자동) 미션 – 구현 PR
개요
camp.nextstep.edu.missionutils의Randoms/Console사용, UI 로직 단위 테스트 제외, 제공Lotto클래스 제약 준수변경 사항
domain
PurchaseAmount: 금액 검증(공백/숫자/양수/1000단위) 및 장수 계산LottoNumber: 번호 범위(1~45) 검증LottoTicketFactory: 6개·중복 없음·범위 검증 후 오름차순 리스트 생성WinningNumbers: 메인/보너스 입력 파싱 및 검증(중복 금지)Rank: 등수/상금 정의(1~5등, NONE)Result: 등수별 집계, 합산 상금, 스냅샷 제공ProfitRate: 총 상금/지출 기반 수익률 계산(소수점 한 자리 반올림, % 포함)Lotto: 중복 검증 보강, 출력용numbers()및 매칭 보조 메서드(contains,countMatchesWith)LottoJudge: 단일 티켓과 당첨 번호 매칭하여Rank산출application
LottoMachine:Randoms.pickUniqueNumbersInRange(1,45,6)사용, 불변 리스트 → 가변 복사 후 정렬GameRunner: 입력 → 발행 → 매칭 → 집계 → 출력 실행 플로우Application:main진입점 (Console.close()호출 안 함 – NsTest 호환)view
InputView: 재입력 루프(예외 시[ERROR]메시지 후 해당 입력부터 다시)OutputView: 발행 결과/당첨 통계/수익률 출력. 예시와 동일한 포맷·개행·순서 유지주요 요구사항 반영 여부
Application.main()camp.nextstep.edu.missionutils.Randoms/Console사용IllegalArgumentException등 명확한 유형 사용, 메시지[ERROR]로 시작%표기테스트
LottoMachine: 불변 리스트 정렬 → 가변 복사 후 정렬로 수정ProfitRate:%누락 →%포함하도록 수정Result.snapshot(): 빈 맵 반환 → 집계 복사본 반환으로 수정회고(간단)
Rank의 라벨로 캡슐화, 발행기 포트/어댑터 분리로 테스트 더블 주입