-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
π 4λ¨κ³ - λ‘λ(μλ) #3763
base: hhhhhwi
Are you sure you want to change the base?
Conversation
- LottoResultTest μ€ λ‘λ λ²νΈλ₯Ό μμ±νλ getInputLottoNumberStrategy λ©μλ λ³κ²½
#tag @neojjc2 |
μ‘°μ
νλ€λ¨ λ¬΄μ¨ κ·Έλ° λ§μμ π
InputViewλ νΉμ Outputμ λ΄λΉνλ μν μ μΈμ λ λ³κ²½μ΄ λμ΄μΌν λΆλΆμ΄κΈ° λλ¬Έμ 리뷰 μ½λ©νΈλ‘ μ견 λλ Έλλ°μ π |
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.
μλ νμΈμ νμ°λ π
λ§μ§λ§ λ¨κ³ μ μ§νν΄μ£Όμ
¨μ΅λλ€ π
κ³ λ―Όνκ³ κ³μ λΆλΆμ λν΄ μμν μ견λλ Έλλ°μ,
νλ² κ°μ κ²ν ν΄μ£Όμλ©΄ μ’μ κ² κ°μ΅λλ€ π
κ·ΈλΌ μ¬ λ¦¬λ·° μμ² κΈ°λ€λ¦¬κ³ μκ² μ΅λλ€ π
- μλ λ‘λ κ°μ μ λ ₯ | ||
- μλ λ‘λ λ²νΈ μ λ ₯ | ||
- [ ] μΆλ ₯ | ||
- λ‘λ ꡬ맀 κ°μ : μλ / μλ κ° μΆλ ₯ |
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.
μꡬμ¬ν μ 리 π―
|
||
if(lottoNumbers.stream().anyMatch(x -> x < LOTTO_NUMBER_MIN || x > LOTTO_NUMBER_MAX)) { | ||
throw new IllegalArgumentException("λ²νΈλ " + LOTTO_NUMBER_MIN + " λ―Έλ§ " + LOTTO_NUMBER_MAX + " μ΄κ³ΌμΈ μλ₯Ό μ λ ₯ν μ μμ΅λλ€."); | ||
} |
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.
κ²μ¦νμ λΆλΆ μ’μ΅λλ€ π
λ€λ§ Integer
μΈ λ‘λλ²νΈ μμ²΄κ° μμκ°μ²΄ν¬μ₯ λλ€λ©΄ μ΄λ¨κΉμ??
μλνλ©΄ WinningNumbers
μμ μ¬μ©μ€μΈ bonusNumber
λ κ²°κ΅ λ‘λ λ²νΈμ€μ νλμ
λλ€ π
λ‘λ λ²νΈ λ²μμ λν κ²μ¦νκ³ μλ μ½λκ° μ€λ³΅μΌλ‘ μλλ°μ, μ΄ λΆλΆμ΄ μ’ μ 리λ κ² κ°μ΅λλ€ π
// AS IS
List<Integer> lottoNumbers;
// TO BE
List<LottoNumber> lottoNumbers;
μ΄ λΆλΆ νλ² κ°μ κ²ν ν΄μ£Όμλ©΄ μ’μ κ² κ°μ΅λλ€ π
PrintView.printNumberOfLotto(numberOfLotto); | ||
LottoPrice lottoPrice = new LottoPrice(InputView.inputPurchasePrice(), InputView.inputNumberOfManualLotto()); | ||
int numberOfAutoLotto = lottoPrice.getNumberOfAutoLotto(); | ||
int numberOfManualLotto = lottoPrice.getNumberOfManualLotto(); |
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.
LottoPrice
λ₯Ό ν΅ν΄μ μλ, μλ μλμ μν κ³Ό μ±
μμ λΆμ¬νμ λΆλΆ λ무 μ’μ΅λλ€ π
λ€λ§ LottoMarketμ lottoPriceλ₯Ό μ λ¬ν΄μ LottoMarketμμ μλλ‘λλ₯Ό μ¬λ μν μ νλ©΄ μ΄λ¨κΉμ??
μ§κΈ ꡬ쑰μμλ mainμ΄ μλ μν©μ΄λΌλ©΄ μλλ‘λλ₯Ό ꡬ맀ν μκ° μμ΅λλ€ π
μ°¨λΌλ¦¬ μ¬μ©μλ‘λΆν° μλλ‘λλ²νΈλ₯Ό λ€ λ°μ κ°κ³Ό , LottoPrice
λ₯Ό LottoMarket
μκ² μ£Όκ³
lottoMarket.buy
κ°μ λ©μλλ₯Ό νΈμΆνκ³ λλ©΄ λ‘λλ²νΈκ° λ΄κΈ΄ ν°μΌμ λ°ννλ κ·Έλ° κ΅¬μ‘°λ‘ κ°λ€λ©΄
μλ§ κ³ λ―Όνμλ λΆλΆμ΄ μ΄λμ λ κ°μ μ΄ λ κ² κ°μ΅λλ€ π
μλ νμΈμ! PRμ΄ μ μ λ λ¦μ΄μ§λ€μ γ
κ·Έλλ μ΅μ μ λ€ ν΄λ³΄κ² μ΅λλ€ γ
μ΄λ² λ―Έμ μ.. μ¬μΈ κ±°λΌκ³ μκ°νλλ° μκ°λ³΄λ€ κ³ λ―Όν΄μΌ λλ μ§μ μ΄ λ§μμ΅λλ€ γ
μ μΌ κ³ λ―Όλμλ μ§μ μ
ManualLottoNumberStrategy μ μ© μ μ¬μ©μμ μ λ ₯κ° λλ‘ λ‘λλ²νΈκ° μμ±λκΈ° λλ¬Έμ InputViewμ μν μ΄ λ°λμ νμνλ°,
μ΄ λ μ λ ₯μ μ± μμ λλ©μΈ λ‘μ§μ λ£μ κ²μΈκ°?
LottoNumbersμ WinningNumbersμ κ²μ¦ λ‘μ§ μΈ‘λ©΄μμλ μ±κ²©μ΄ κ°μ§λ§, μν μ΄ λ€λ₯Έ λ° WinningNumbersμ LottoNumbersλ₯Ό μ‘°ν©ν΄λ λ κΉ?
μ μ§μ λ€μ΄μμ΅λλ€. νΌλλ°±μ λ°λ κ² λ μ’μ κ² κ°μ μΌλ¨ μ‘°μ ν μ½λ π μ΄μ§λ§ PR λ¨Όμ μ¬λ¦½λλ€! μ λΆνλ립λλ€!