forked from woowacourse/java-lotto
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : LottoRank.java 로또 등수와 보상을 모아놓은 enum 구현
- Loading branch information
Showing
2 changed files
with
29 additions
and
3 deletions.
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
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 |
---|---|---|
@@ -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; | ||
} | ||
} |