-
Notifications
You must be signed in to change notification settings - Fork 48
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
[로또 미션] 신예린 미션 제출합니다. #19
Open
nyeroni
wants to merge
32
commits into
next-step:nyeroni
Choose a base branch
from
nyeroni:nyeroni
base: nyeroni
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
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
958541e
feat: 로또 구매할 금액 입력
nyeroni 8627586
feat: 구매한 로또 출력
nyeroni c086150
feat: 로또 랜덤 번호로 생성
nyeroni d435b8e
feat: 로또 생성
nyeroni 07b7bc7
feat: 총 구매한 로또를 list로 생성
nyeroni 5ed6fea
feat: 구매할 가격 입력 후 해당 가격 만큼 로또 생성 및 출력
nyeroni 2fd7c31
feat: 실행
nyeroni ebbd2b3
feat: 랜덤 숫자 생성 변경
nyeroni 2a199f1
feat: 정렬 코드 삭제
nyeroni 2d59e3d
feat: 로또 랜덤 생성 중복 방지 추가
nyeroni 6b2269c
feat: 당첨 번호 입력 및 당첨 개수, 수익률 계산 및 출력
nyeroni 7052bdd
feat: 메서드 명 변경 및 로또 생성 오류 해결
nyeroni 4375301
Refactor: 불필요한 코드 정리
nyeroni e2860da
feat: 요구사항 정리
nyeroni 49773c8
feat: 출력 문구 enum으로 설정
nyeroni 9c28320
feat: 출력 문구 수정 및 로또 출력 방식 변경
nyeroni 2fe5105
feat: 변수명 변경 및 보너스 번호 매치 메서드 생성
nyeroni 4595b55
feat: 수동 로또 생성
nyeroni 561a3b3
feat: 수동 로또 생성 및 로또 목록 출력 방식 변경
nyeroni 0e387fb
feat: enum타입 수정
nyeroni cfe53f4
feat: 투입 금액 및 로또 구매 개수 예외 처리
nyeroni ef9bdab
feat: 수동 개수 예외 처리 및 설정
nyeroni 3d69130
feat: 보너스넘버 예외 처리 및 설정
nyeroni f1804d5
feat: 로또 예외 처리
nyeroni 652c085
feat: 예외 처리 및 수정
nyeroni 7beec8d
feat: 결과 출력 수정
nyeroni 48b8f00
feat: 예외 문구 수정
nyeroni 04d0f96
feat: 예외 문구 수정
nyeroni 2fd040c
feat: 생성자 추가
nyeroni 4f9977c
feat: 생성자 추가
nyeroni 2f51b48
test: 테스트코드 작성
nyeroni 36e8947
test: 테스트코드 작성
nyeroni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
package model; | ||
|
||
public enum WinningType { | ||
FIRST("6개 일치 (2000000000원)"), | ||
SECOND("5개 일치, 보너스 볼 일치 (30000000원)"), | ||
THIRD("5개 일치 (1500000원)"), | ||
FOURTH("4개 일치 (50000원)"), | ||
FIFTH("3개 일치 (5000원)"); | ||
FIFTH(3, 5000, "3개 일치 (5000원)- "), | ||
FOURTH(4, 50000, "4개 일치 (50000원)- "), | ||
THIRD(5, 150000, "5개 일치 (1500000원)- "), | ||
SECOND(5, 30000000, "5개 일치, 보너스 볼 일치(30000000원)- "), | ||
FIRTH(6, 2000000000, "6개 일치 (2000000000원)- "); | ||
|
||
private String sameCountMessage; | ||
private static final int WINNING_MIN_COUNT = 3; | ||
private static final String ERROR_MESSAGE = "[ERROR]"; | ||
|
||
WinningType(String sameCountMessage) { | ||
this.sameCountMessage = sameCountMessage; | ||
private int countOfCorrect; | ||
private int reward; | ||
private String message; | ||
|
||
WinningType(int countOfCorrect, int reward, String message) { | ||
this.countOfCorrect = countOfCorrect; | ||
this.reward = reward; | ||
this.message = message; | ||
} | ||
|
||
public String getSameCountMessage() { | ||
return sameCountMessage; | ||
public String getMessage(){ | ||
return message; | ||
} | ||
|
||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum 활용을 잘 하신 것 같습니다! 같은 의미인 것 끼리 모아서 메시지를 구성할때에도 편리할 것 같아요
메시지까지 묶을 생각은 못했었는데 배워갑니다