Skip to content

Commit

Permalink
feat : LottoRank.java 로또 등수와 보상을 모아놓은 enum 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Gomding committed Feb 17, 2021
1 parent 5e690fc commit 48ec8d1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -26,9 +26,9 @@
- [x] 6자리의 랜덤 숫자로 로또 티켓을 생성한다.
- [x] Money.java 로또 구매 금액을 가진다.
- [x] 예외 : 1000원 미만은 가질 수 없다.
- [ ] WinStatistics.java 정보가 맞는지 확인한다.
- [ ] FIRST_PLACE(200000000000, 당첨 횟수)
- [ ] 2등,3등,4등,5등 까지 동일하게 한다.
- [x] LottoRank.java 로또 등수와 보상을 모아놓은 enum
- [x] FIRST_PLACE(당첨 횟수, 200000000000)
- [x] 2등,3등,4등,5등 까지 동일하게 한다.
### Non TDD
- [ ] InputView.java 구매 금액을 입력 받는다.
- [ ] OutputView.java
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/lotto/LottoRank.java
@@ -0,0 +1,26 @@
package lotto;

public enum LottoRank {
FIRST_PLACE(6, 2000000000),
SECOND_PLACE(5, 30000000),
THIRD_PLACE(5, 1500000),
FOURTH_PLACE(4, 50000),
FIFTH_PLACE(3, 5000),
SIXTH_PLACE(0, 0);

private int matches;
private int reward;

LottoRank(int matches, int reward) {
this.matches = matches;
this.reward = reward;
}

public int getMatches() {
return matches;
}

public int getReward() {
return reward;
}
}

0 comments on commit 48ec8d1

Please sign in to comment.