Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs(step4): add requirements and todo lists for step4 * fix(step3): apply code review feedbacks * feat(step4): implement bonus ball for second prize * fix(pr): apply step4 code review feedbacks - add first class collection for lotto prize - add missing tests
- Loading branch information
1 parent
2e24c09
commit 618a2fa
Showing
17 changed files
with
271 additions
and
48 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package lotto.constants; | ||
|
||
public class LottoGameConstant { | ||
private LottoGameConstant() {} | ||
|
||
public static final int LOTTO_TICKET_PRICE = 1_000; | ||
public static final double PROFIT_CRITERIA = 1.0; | ||
} |
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
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
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
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,40 @@ | ||
package lotto.domain; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
public class LottoPrizes { | ||
private final List<LottoPrize> lottoPrizes; | ||
|
||
public LottoPrizes(List<LottoPrize> lottoPrizes) { | ||
this.lottoPrizes = lottoPrizes; | ||
} | ||
|
||
public List<LottoPrize> getLottoPrizes() { | ||
return this.lottoPrizes; | ||
} | ||
|
||
public int size() { | ||
return this.lottoPrizes.size(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
LottoPrizes that = (LottoPrizes) o; | ||
return Objects.equals(lottoPrizes, that.lottoPrizes); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(lottoPrizes); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "LottoPrizes{" + | ||
"lottoPrizes=" + lottoPrizes + | ||
'}'; | ||
} | ||
} |
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
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
Oops, something went wrong.