Skip to content

[πŸš€ 사이클2 - λ―Έμ…˜ (λΈ”λž™μž­ λ² νŒ… κΈ°λŠ₯)] 제제 λ―Έμ…˜ μ œμΆœν•©λ‹ˆλ‹€.#1093

Merged
Gomding merged 72 commits intowoowacourse:alstj2384from
alstj2384:step2
Mar 23, 2026
Merged

[πŸš€ 사이클2 - λ―Έμ…˜ (λΈ”λž™μž­ λ² νŒ… κΈ°λŠ₯)] 제제 λ―Έμ…˜ μ œμΆœν•©λ‹ˆλ‹€.#1093
Gomding merged 72 commits intowoowacourse:alstj2384from
alstj2384:step2

Conversation

@alstj2384
Copy link

@alstj2384 alstj2384 commented Mar 12, 2026

사이클 2 λΈ”λž™μž­ λ―Έμ…˜ μ œμΆœν•©λ‹ˆλ‹€! πŸ™‹πŸ»β€β™‚οΈ

μ €λ²ˆ λ―Έμ…˜μ—μ„œλŠ” 제좜이 λŠ¦μ—ˆμ§€λ§Œ, μ΄λ²ˆμ—λŠ” κ°€μ΄λ“œμ— 따라 κΈ°λŠ₯ κ΅¬ν˜„ μ™„λ£Œ μ‹œμ μ— 맞좰 λ°”λ‘œ μ œμΆœν•©λ‹ˆλ‹€!

사이클 1μ—μ„œ μ£Όμ‹  ν”Όλ“œλ°±μ„ λͺ¨λ‘ λ°˜μ˜ν•˜κ³  μ‹Άμ—ˆμœΌλ‚˜, μš°μ„ μˆœμœ„λ₯Ό μ‹ κ·œ κΈ°λŠ₯ κ΅¬ν˜„(제좜 κΈ°κ°„ κ³ λ €)에 두어 아직 λ°˜μ˜ν•˜μ§€ λͺ»ν•œ 뢀뢄이 λ§ŽμŠ΅λ‹ˆλ‹€. 😒
λ¦¬λ·°μ–΄λ‹˜μ΄ λ§Žμ€ 리뷰이λ₯Ό κ΄€λ¦¬ν•˜μ‹œλŠλΌ 이전 ν”Όλ“œλ°±μ„ κΈ°μ–΅ν•˜μ‹œκΈ° μ–΄λ €μšΈ 수 μžˆμœΌλ‹ˆ, μ§€λ‚œ ν”Όλ“œλ°± 쀑뢁 여뢀와 상관없이 νŽΈν•˜κ²Œ ν”Όλ“œλ°± λ‚¨κ²¨μ£Όμ„Έμš”! πŸ˜ƒ
μ§€λ‚œ ν”Όλ“œλ°±κ³Ό μ’…ν•©ν•˜μ—¬ λ°˜μ˜ν•˜κ² μŠ΅λ‹ˆλ‹€!

체크 리슀트

  • λ―Έμ…˜μ˜ ν•„μˆ˜ μš”κ΅¬μ‚¬ν•­μ„ λͺ¨λ‘ κ΅¬ν˜„ν–ˆλ‚˜μš”?
  • Gradle testλ₯Ό μ‹€ν–‰ν–ˆμ„ λ•Œ, λͺ¨λ“  ν…ŒμŠ€νŠΈκ°€ μ •μƒμ μœΌλ‘œ ν†΅κ³Όν–ˆλ‚˜μš”?
  • μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ΄ μ •μƒμ μœΌλ‘œ μ‹€ν–‰λ˜λ‚˜μš”?

μ–΄λ–€ 뢀뢄에 μ§‘μ€‘ν•˜μ—¬ 리뷰해야 ν• κΉŒμš”?

κΈˆμ•‘ μ²˜λ¦¬μ— λŒ€ν•˜μ—¬

[ν˜„μž¬ 상황]
μ‚¬μš©μžμ˜ μžμ‚°κ³Ό κ΄€λ ¨λœ κΈˆμ•‘ λ°μ΄ν„°λŠ” 엄격해야 ν•œλ‹€κ³  λ“€μ–΄μ„œ, 이번 λ―Έμ…˜μ—μ„œλŠ” 이 뢀뢄을 신경써보고 μ‹Άμ—ˆμŠ΅λ‹ˆλ‹€. ν˜„μž¬λŠ” λ‹¨νŒμ΄μ§€λ§Œ, μ—¬λŸ¬ λΌμš΄λ“œκ°€ μ§„ν–‰λ˜λŠ” 상황과 κΈˆμ•‘ μ œν•œ μ—†λŠ” λ°°νŒ…μ΄ κ°€λŠ₯ν•˜λ„λ‘ 혼자만의 κ·œμΉ™μ„ μ„Έμ›Œ κ³ λ―Όν–ˆμŠ΅λ‹ˆλ‹€.

[κ³ λ―Ό 지점]
λΈ”λž™μž­ 승리 μ‹œ λ°°λ‹Ήλ₯ (1.5λ°°)둜 인해 μ†Œμˆ˜μ μ΄ λ°œμƒν•  수 μžˆλŠ” μƒν™©μ—μ„œ, 두 κ°€μ§€ λ°©ν–₯을 κ²€ν† ν–ˆμŠ΅λ‹ˆλ‹€.

  1. 도메인 μ •μ±…μœΌλ‘œ μ œμ•½(짝수만 λ°°νŒ…): λ°°νŒ… κΈˆμ•‘μ„ 짝수둜 μ œν•œν•˜λ©΄ μ†Œμˆ˜μ  계산 문제λ₯Ό μ›μ²œ 봉쇄할 수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€. ν•˜μ§€λ§Œ "λ‚΄λΆ€ κ΅¬ν˜„μ˜ 편의λ₯Ό μœ„ν•΄ 도메인 둜직(λ°°νŒ… μžμœ λ„)λ₯Ό μ œν•œν•˜λŠ” 것은 μ˜³μ§€ μ•Šλ‹€"κ³  생각이 λ“€μ–΄ μ² νšŒν–ˆμŠ΅λ‹ˆλ‹€.
  2. μžλ£Œν˜• 선택: μ œν•œ μ—†λŠ” κΈˆμ•‘κ³Ό μ •λ°€ν•œ 계산을 μœ„ν•΄ BigInteger와 BigDecimal을 κ³ λ €ν–ˆμŠ΅λ‹ˆλ‹€:
  • BigInteger: μ†Œμˆ˜μ  자리만큼 미리 κ³±ν•˜μ—¬ μ •μˆ˜ μ—°μ‚°μœΌλ‘œ 처리
  • BigDecimal: APIμ—μ„œ μ œκ³΅ν•˜λŠ” μ†Œμˆ˜μ  μ—°μ‚° κΈ°λŠ₯을 직접 ν™œμš©

[μ΅œμ’… κ²°μ •: BigDecimal]
두 방식 λͺ¨λ‘ κ΅¬ν˜„ν•΄ λ³Έ κ²°κ³Ό, BigDecimal이 더 λͺ…ν™•ν•˜κ²Œ 관리할 수 μžˆλ‹€κ³  νŒλ‹¨ν•˜μ—¬ μ„ νƒν–ˆμŠ΅λ‹ˆλ‹€.

Player와 BetMoney 섀계

[ν˜„μž¬ 상황]
ν˜„μž¬ BlackjackGame이 List<String>으둜 이름을 ν•œ λ²ˆμ— λ°›μ•„ ν”Œλ ˆμ΄μ–΄λ₯Ό μƒμ„±ν•˜λŠ” ꡬ쑰닀 λ³΄λ‹ˆ, 이름 μž…λ ₯ ν›„ λ°°νŒ… κΈˆμ•‘μ„ μΆ”κ°€λ‘œ λ°›λŠ” κ³Όμ •μ—μ„œ 섀계λ₯Ό μ„Έ κ°€μ§€ λ°©ν–₯으둜 κ³ λ―Όν–ˆμŠ΅λ‹ˆλ‹€.

1번: Playerμ—μ„œ BetMoney ν•„λ“œλ₯Ό final둜 관리 & BetMoney κ°€λ³€

Class Player{
    private final BetMoney betMoney // betMoney κ°€λ³€
    public void setBetMoney(int value){
        betMoney.setValue(value);
    }
}

μž₯점 : κΈ°μ‘΄ 생성 방식 μœ μ§€ κ°€λŠ₯
단점: BetMoneyκ°€ κ°€λ³€μœΌλ‘œ, 방어적 볡사 ν•„μš” 및 잠재적 버그 μœ„ν—˜ 쑴재, κ²°κ΅­ setterκ°€ ν•„μš”ν•¨.

2번: Playerμ—μ„œ BetMoney final없이 관리 & BetMoney λΆˆλ³€

Class Player{
    private BetMoney betMoney // betMoney λΆˆλ³€
    public void setBetMoney(int value){
        betMoney = BetMoney.of(value);
    }
}

μž₯점 : κΈ°μ‘΄ 생성 방식 μœ μ§€ κ°€λŠ₯, BetMoney λΆˆλ³€μœΌλ‘œ 관리 κ°€λŠ₯
단점: Setter μ‚¬μš© ν•„μš”, 객체 생성 ν›„ μƒνƒœκ°€ λ³€ν•˜λ―€λ‘œ 잠재적 버그 μœ„ν—˜ 쑴재

3번: Playerμ—μ„œ BetMoney ν•„λ“œλ₯Ό final둜 관리 & BetMoney λΆˆλ³€

Class Player{
    private final BetMoney betMoney // betMoney λΆˆλ³€
    public Player(... , int value){
        betMoney = BetMoney.of(value);
    }
    // setter μ—†μŒ
}

μž₯점 : λͺ¨λ‘ λΆˆλ³€μœΌλ‘œ, 잠재적 버그 μœ„ν—˜μ—μ„œ μƒλŒ€μ μœΌλ‘œ μ•ˆμ „ν•¨.
단점: ν˜„μž¬ 생성 둜직 μ „λ©΄ μˆ˜μ • ν•„μš” 및 Viewμ—μ„œ 이름/κΈˆμ•‘μ„ λͺ¨λ‘ ν•œ λ²ˆμ— λ„˜κ²¨μ•Ό 함

μ €λŠ” μš°μ„  λΉ λ₯Έ κ΅¬ν˜„μ„ μœ„ν•΄ 2λ²ˆμ„ μ„ νƒν–ˆμŠ΅λ‹ˆλ‹€.
κΈˆμ•‘ 데이터(BetMoney) μžμ²΄λŠ” λΆˆλ³€ν•˜κ²Œ λ³΄ν˜Έν•  수 μžˆμ—ˆμœΌλ‚˜, μ—¬μ „νžˆ Player의 Setterλ₯Ό 톡해 μƒνƒœκ°€ 변경될 수 μžˆλ‹€λŠ” 점이 λ§ˆμŒμ— κ±Έλ ΈμŠ΅λ‹ˆλ‹€.

κ·Έλž˜μ„œ ꡬ쑰적 μ•ˆμ „μ„±μ„ μœ„ν•΄ 3번으둜 λ¦¬νŒ©ν† λ§μ„ μˆ˜ν–‰ν• κΉŒ ν•©λ‹ˆλ‹€. (아직 λͺ» ν–ˆμŠ΅λ‹ˆλ‹€!)
λ‹€λ§Œ 3번 λ„μž… μ‹œ λ°œμƒν•˜λŠ” 쀑볡 검증에 λŒ€ν•΄ κ³ λ―Όν•΄ λ³΄μ•˜κ³ , λ‹€μŒκ³Ό 같은 결둠을 λ‚΄λ ΈμŠ΅λ‹ˆλ‹€.

  • [상황] Viewμ—μ„œ 이름과 κΈˆμ•‘μ„ λͺ¨μ•„ λ„λ©”μΈμœΌλ‘œ λ„˜κ²¨μ•Ό ν•˜λ―€λ‘œ View λ‹¨μ˜ 1μ°¨ 검증(이름 쀑볡, 길이, 음수 μ—¬λΆ€ λ“±)κ³Ό λ„λ©”μΈμ˜ 2μ°¨ 검증이 겹치게 λ©λ‹ˆλ‹€.
  • [사고] μ²˜μŒμ—λŠ” μ •μ±… λ…ΈμΆœκ³Ό 검증 쀑볡이 λΉ„νš¨μœ¨μ μ΄λΌκ³  μƒκ°ν–ˆμœΌλ‚˜, μ›Ή μ‚¬μ΄νŠΈμ˜ νšŒμ›κ°€μž… 절차λ₯Ό λ– μ˜¬λ¦¬μž 생각이 λ°”λ€Œμ—ˆμŠ΅λ‹ˆλ‹€. νšŒμ›κ°€μž… μ‹œ 아이디 길이, 쀑볡, λΉ„λ°€λ²ˆν˜Έ 길이 λ“±μ˜ 정책이 λ…ΈμΆœλ˜κ³  1차적으둜 κ²€μ¦ν•˜λŠ” 것 처럼, Viewμ—μ„œμ˜ μ •μ±… λ…ΈμΆœκ³Ό 검증도 λΉ„μŠ·ν•˜λ‹€λŠ” 생각이 λ“€μ—ˆμŠ΅λ‹ˆλ‹€.
  • [κ²°λ‘ ] 이름 μ€‘λ³΅μ΄λ‚˜ λ°°νŒ… κΈˆμ•‘μ˜ 음수 μ œν•œκ°™μ€ 정책은 μ‚¬μš©μžλ„ μ•Œμ•„μ•Ό ν•  κ·œμΉ™μ΄λ―€λ‘œ, Viewμ—μ„œ 이λ₯Ό ν‘œν˜„ν•˜κ³  κ²€μ¦ν•˜λŠ” 것은 μžμ—°μŠ€λŸ¬μš΄ ꡬ쑰라고 νŒλ‹¨ν–ˆμŠ΅λ‹ˆλ‹€!

κ²°κ΅­ λ‹€μŒκ³Ό 같은 ꡬ쑰λ₯Ό κ°–κ²Œλ©λ‹ˆλ‹€:

  1. ν”Œλ ˆμ΄μ–΄ 이름 μž…λ ₯ & Viewμ—μ„œ 쀑볡 및 길이 검증 (아직 Players 생성 x)
  2. ν”Œλ ˆμ΄μ–΄ λ°°νŒ… κΈˆμ•‘ μž…λ ₯ & Viewμ—μ„œ κΈˆμ•‘ 검증
  3. λ°°νŒ… λͺ¨λ‘ μž…λ ₯ μ‹œ Playersλ₯Ό μΌκ΄„μ μœΌλ‘œ 생성(도메인 검증 μˆ˜ν–‰)

[질문]
μœ„μ™€ 같은 상황(μž…λ ₯ μ‹œκΈ°κ°€ λ‹€λ₯Έ 데이터λ₯Ό μ²˜λ¦¬ν•  λ•Œ)에 더 μ μ ˆν•œ 방법이 μžˆμ„κΉŒμš”?
3번으둜 λ¦¬νŒ©ν† λ§μ„ μˆ˜ν–‰ν•˜κΈ°λ‘œ κ²°μ •ν•œ μ΄μœ μ™€ 사고 과정은 νƒ€λ‹Ήν•˜λ‹€κ³  μƒκ°ν•˜μ‹œλ‚˜μš”?

도메인과 μž…μΆœλ ₯의 뢄리에 λŒ€ν•΄μ„œ (03.13 20:15 μΆ”κ°€)

[질문]
"μž…λ ₯ λ°©μ‹μ˜ μΆ”κ°€λ‘œ 도메인이 μˆ˜μ •λ˜λŠ” 상황"에 λŒ€ν•΄ 크루와 토둠을 톡해 "μž…λ ₯ 방식이 도메인에 영ν–₯을 μ£ΌλŠ” κ΅¬μ‘°λŠ” μ μ ˆν•˜μ§€ μ•Šλ‹€" λΌλŠ” 결둠에 λ„λ‹¬ν–ˆμŠ΅λ‹ˆλ‹€.
도메인은 μ™ΈλΆ€μ˜ μž…λ ₯ 방식과 λ¬΄κ΄€ν•˜κ²Œ 본질적인 ν˜•νƒœλ₯Ό μœ μ§€ν•˜κ³ , Controllerλ‚˜ View 같은 μ™ΈλΆ€ κ³„μΈ΅μ—μ„œ 도메인이 μ›ν•˜λŠ” ν˜•νƒœλ‘œ 데이터λ₯Ό κ°€κ³΅ν•΄μ„œ λ„˜κ²¨μ€˜μ•Ό ν•œλ‹€λŠ” μ˜κ²¬μΈλ°μš”!
이런 λ°©ν–₯성은 μ μ ˆν• κΉŒμš”? ν˜„μ—…μ—μ„œλ„ 이런 ꡬ쑰둜 개발이 μ§„ν–‰λ˜λŠ”μ§€ κΆκΈˆν•©λ‹ˆλ‹€!

Copy link

@Gomding Gomding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 제제!
사이클2 λΉ λ₯΄κ²Œ μ§„ν–‰ν•΄μ£Όμ…¨λ„€μš” πŸ™‡
μ½”λ©˜νŠΈ λ‚¨κ²ΌμœΌλ‹ˆ ν™•μΈλΆ€νƒλ“œλ €μš”~
이전 PR 에 λ¨Έμ§€ν•˜λ©΄μ„œ λ‚¨κ²Όλ˜ μ½”λ©˜νŠΈλŠ” μ΄λ²ˆμ— κ³ λ €ν•˜μ§€ μ•ŠμœΌμ‹ κ²ƒ 같은데
ν•¨κ»˜ λ°˜μ˜ν•΄μ£Όμ„Έμš”

μΆ”κ°€λ‘œ κΆκΈˆν•œ 점 있으면 DM μ΄λ‚˜ μ½”λ©˜νŠΈ λ‚¨κ²¨μ£Όμ„Έμš”!

Copy link
Author

@alstj2384 alstj2384 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 찰리!

였늘 "μƒνƒœ νŒ¨ν„΄"에 μ•Œκ²Œ λ˜μ–΄ ν•™μŠ΅ ν›„ μ μš©ν•˜μ—¬ λ¦¬νŒ©ν† λ§ ν•΄λ³΄μ•˜μŠ΅λ‹ˆλ‹€.(아직 많이 μ–΄λ ΅μŠ΅λ‹ˆλ‹€....)
κ·Έ 외에도 흐름 μ œμ–΄λ₯Ό λ‹΄λ‹Ήν•˜λ˜ BlackjackGame을 μ‚­μ œν•œ ν›„, Controllerμ—μ„œ 도메인을 ν™œμš©ν•˜μ—¬ 흐름을 μ œμ–΄ν•˜λ„λ‘ μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€!

Copy link

@Gomding Gomding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 제제!
μƒνƒœ νŒ¨ν„΄ λ„μž…ν•΄μ£Όμ…¨λ„€μš” πŸ˜„
λͺ‡κ°€μ§€ 의견 λ‚¨κ²ΌμœΌλ‹ˆ ν™•μΈν•΄μ£Όμ„Έμš”~

κΆκΈˆν•œ 점 있으면 μ–Έμ œλ“  DM μ΄λ‚˜ μ½”λ©˜νŠΈ λ‚¨κ²¨μ£Όμ„Έμš”!

Copy link
Author

@alstj2384 alstj2384 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 찰리!
ν”Όλ“œλ°± λ°˜μ˜ν•˜μ—¬ μ œμΆœν•©λ‹ˆλ‹€ 😊

Copy link

@Gomding Gomding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 제제!
κ³ λ―Όκ³Ό ν•¨κ»˜ μ μ ˆν•˜κ²Œ μˆ˜μ •ν•΄μ£Όμ…¨λ„€μš”~
μΆ”κ°€λ‘œ λͺ‡κ°€μ§€ μ½”λ©˜νŠΈ λ‚¨κ²ΌλŠ”λ° ν™•μΈν•΄μ£Όμ„Έμš”!
λ‹€μŒ μš”μ²­μ—λŠ” 머지해도 될 것 κ°™μ•„μš” :)

κΆκΈˆν•œ 점 있으면 μ–Έμ œλ“  DM μ΄λ‚˜ μ½”λ©˜νŠΈ λ‚¨κ²¨μ£Όμ„Έμš” πŸ™‡

Copy link
Author

@alstj2384 alstj2384 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ν”Όλ“œλ°± λ°˜μ˜ν•˜μ—¬ μ œμΆœν•©λ‹ˆλ‹€! 😊

Copy link

@Gomding Gomding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 제제!
κ³ λ―Όκ³Ό ν•¨κ»˜ 잘 λ°˜μ˜ν•΄μ£Όμ…¨λ„€μš”~
λ¨Έμ§€ν•  μ˜ˆμ •μ΄λΌκ³  ν–ˆμ§€λ§Œ..
λͺ‡κ°€μ§€λ§Œ ν•¨κ»˜ 점검해보면 μ’‹κ² μ–΄μ„œ RC λ“œλ¦½λ‹ˆλ‹€ πŸ˜“

κΆκΈˆν•œ 점 있으면 DM μ΄λ‚˜ μ½”λ©˜νŠΈ λ‚¨κ²¨μ£Όμ„Έμš”! πŸ™

this.cards = List.copyOf(hand.getCards());
public static Hand of(List<Card> cards) {
return new Hand(cards);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ν•΄λ‹Ή 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œλŠ” μ–΄λ–€ μ˜λ„λ‘œ λ§Œλ“œμ‹ κ±΄κ°€μš”?

μ•„λž˜ μƒμ„±μžμ™€ μ–΄λ–€ 차이가 μžˆμ„κΉŒμš”?

    private Hand(List<Card> cards) {
        this.cards = cards;
    }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 뢀뢄은 μ–΄λ–»κ²Œ ν•˜λŠ” 게 μ μ ˆν• μ§€ κ³ λ―Όμž…λ‹ˆλ‹€.

Hand 객체 생성 방법이 "Hand의 볡사본을 λ°˜ν™˜ν•˜λŠ” 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œ"와 "newλ₯Ό μ΄μš©ν•œ 생성" 두 κ°€μ§€κ°€ 혼재되면 μ‚¬μš©μž μž…μž₯μ—μ„œ "뭘 μ‚¬μš©ν•΄μ•Ό ν•˜μ§€?" ν•˜κ³  ν—·κ°ˆλ¦΄ μˆ˜λ„ μžˆμ„ κ±° κ°™μ•˜μŠ΅λ‹ˆλ‹€.

κ·Έλž˜μ„œ 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œκ°€ ν¬ν•¨λ˜λŠ” 클래슀의 μƒμ„±μžλŠ” λͺ¨λ‘ 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œλ₯Ό μ‚¬μš©ν•˜λ„λ‘ κ΅¬ν˜„ν–ˆλŠ”λ°μš”.

λ”°λ‘œ νŠΉμˆ˜ν•œ λͺ©μ μ΄ μžˆλŠ” μƒμ„±μžλ§Œ 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œλ₯Ό μ΄μš©ν•˜κ³ ,
μ˜ˆμ‹œλ‘œ μ£Όμ‹  것 처럼 기본적인 생성은 newλ₯Ό μ΄μš©ν•œ 생성을 ν•˜λ„λ‘ ν•˜λŠ” 게 μ μ ˆν• κΉŒμš”?
찰리의 의견이 κΆκΈˆν•©λ‹ˆλ‹€ πŸ€”οΏ½

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고민을 μ μ ˆν•˜κ²Œ ν•΄μ£Όμ…¨λ„€μš”!
νŒ€μ˜ μ»¨λ²€μ…˜, μ·¨ν–₯에 따라 λ‹¬λΌμ§ˆ κ·œμΉ™μœΌλ‘œ λ³΄μ΄λ„€μš” γ…Žγ…Ž
일단 μ €λŠ” 기본적인 ν•„λ“œλ₯Ό λ°›μ•„μ„œ μƒμ„±ν•˜λŠ” 것이라면 new λ₯Ό μ΄μš©ν•œ μƒμ„±μžλ₯Ό μ‚¬μš©ν•˜λŠ”κ²Œ λͺ…ν™•ν•˜λ‹€κ³  μƒκ°ν•΄μš”!

그런데 new μƒμ„±μžλ₯Ό private 으둜 닫아두신것을 이제 λ΄€λ„€μš” πŸ˜“
λ§Œμ•½ private 으둜 닫아두셨닀면 μ €λŠ” 제제의 κ΅¬ν˜„λŒ€λ‘œ 정적 νŒ©ν† λ¦¬λ§Œ μ œκ³΅ν•œλ‹€! λΌλŠ” λ°©ν–₯도 λ™μ˜ν•©λ‹ˆλ‹€

ν˜Όλž€μ„ λ“œλ €μ„œ μ£„μ†‘ν•΄μš” πŸ₯²πŸ₯²πŸ₯²

public boolean decideHitStand(Score boundary) {
return getTotalSum().isLessThanOrEqualTo(boundary);
public boolean isHittable() {
return state.hand().totalSum().isLessThanOrEqualTo(Score.DEALER_HIT_STAND_BOUNDARY);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state μ—μ„œ hand λ₯Ό κΊΌλ‚΄μ„œ 총점을 κ³„μ‚°ν•˜λŠ”κ²ƒμ΄ μ˜³μ„κΉŒμš”!
λ””λ―Έν„° 법칙, Tell Dont Ask μ›μΉ™μœΌλ‘œ κ³ λ―Όν•΄λ³΄μ‹œμ£  πŸ˜„

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ°˜μ˜ν•΄μ„œ λ¦¬νŒ©ν† λ§ ν–ˆμŠ΅λ‹ˆλ‹€!

ν•œ κ°€μ§€ κΆκΈˆν•œ 점이 μžˆλŠ”λ°, λ¦¬νŒ©ν† λ§ κ³Όμ •μ—μ„œ λ‚΄λΆ€ 클래슀의 λ©”μ„œλ“œ κ²°κ³Όλ₯Ό κ·ΈλŒ€λ‘œ λ‚΄λ³΄λ‚΄λŠ” κ²½μš°κ°€ μƒκΈ°λŠ”λ°, 이럴 λ•Œλ§ˆλ‹€ 섀계가 잘λͺ»λœκ±΄κ°€? λΌλŠ” 생각이 λ“­λ‹ˆλ‹€. λ¬Όλ‘  ν•΄λ‹Ή ν΄λž˜μŠ€μ—μ„œ μˆ˜ν–‰ν•  수 μžˆλŠ” 둜직이 ν¬ν•¨λœλ‹€λ©΄ κ·Έ 자체둜 μ˜λ―Έκ°€ μžˆκ² μ§€λ§Œ, κ·Έλ ‡μ§€ μ•Šμ€ 경우(λž˜ν•‘λ§Œ ν•˜λŠ” 경우)에 μ°μ°ν•œ λŠλ‚Œμ΄ λ“œλŠ”λ°μš”.

클래슀의 결괏값을 λž˜ν•‘λ§Œ ν•˜λŠ” κ²½μš°λŠ” μ–΄μ©” 수 없이 μΌμ–΄λ‚˜λŠ” κ±ΈκΉŒμš”?
ν˜Ήμ€ 섀계가 잘λͺ»λ˜μ—ˆλŠ”μ§€ 검사해 λ³Όλ§Œν•œ 트리거둜 μ‚¬μš©ν•΄ 볼만 ν• κΉŒμš”?
λ¬Όλ‘  정도에 차이가 μžˆκ² μ§€λ§Œ, μ°μ°ν•œ λŠλ‚Œμ΄ λ“œλŠ” 경우 μ–΄λ–»κ²Œ 생각해 보면 쒋을지 κΆκΈˆν•΄μš”.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고민을 ν•΄λ³Ό 수 μžˆλŠ” λΆ€λΆ„μ΄λ„€μš” γ…Žγ…Ž
섀계에 λŒ€ν•΄ 점검을 ν•΄λ³Ό 수 μžˆλŠ” λŠλ‚Œμ΄λΌ μƒκ°ν•΄μš”!
λ‹€λ§Œ λ””λ―Έν„° λ²•μΉ™μ˜ 탄생 배경에 λŒ€ν•΄μ„œλŠ” 이미 μ•Œκ³  계싀거라 μƒκ°ν•΄μš” :)
세뢀적인 것에 λŒ€ν•œ μ˜μ‘΄μ„ μ—†μ• κ³  ν˜‘λ ₯ν•˜λŠ” κ°μ²΄ν•˜κ³ λ§Œ λŒ€ν™”λ₯Ό ν•˜λŠ”κ²ƒμ΄μ£ 

세뢀적인 것을 μ•Œκ²Œλ˜λ©΄ μ–΄λ–€ 단점이 μžˆλŠ”μ§€λŠ” μ œμ œλ„ μ•Œκ³  κ³„μ‹œκ² μ£ ? πŸ˜„

throw new IllegalArgumentException(Card.FIELD_CAN_NOT_BE_NULL);
}
}
protected State state;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ‹¨μˆœ 질문인데
state λŠ” final 둜 재 할당이 λΆˆκ°€λŠ₯ν•˜λ„λ‘ ν•˜λŠ”κ²ƒμ€ 고렀해보셨을지 κΆκΈˆν•΄μš”!
λΆˆλ³€λ„ κ³ λ €ν•΄λ³΄μ…¨μ„κΉŒ κΆκΈˆν•˜μ—¬..
제제의 μ„ νƒμ΄μœ κ°€ κΆκΈˆν•©λ‹ˆλ‹€ πŸ˜„

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λΆˆλ³€μœΌλ‘œ ν•˜λŠ” 방법은 고민을 해보진 λͺ»ν–ˆμŠ΅λ‹ˆλ‹€. 😭

객체λ₯Ό λ°˜ν™˜ν•˜λŠ” μƒνƒœ νŒ¨ν„΄μ—μ„œ final을 μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 게 ꡬ쑰적으둜 κ°€λŠ₯ν•œκ°€? λΌλŠ” ꢁ금증이 λ“€μ–΄μš”.

Participantκ°€ μ•„λ‹ˆλ”λΌλ„ Stateλ₯Ό μ‚¬μš©ν•˜λŠ” μž…μž₯에선 λ³€ν™”λ˜λŠ” State μƒνƒœλ₯Ό μ μš©ν•˜κΈ° μœ„ν•΄μ„  final이 μ—†μ–΄μ•Ό ν•  κ±° 같은데, ν˜Ήμ‹œ 더 μ μ ˆν•œ 방법이 μžˆμ„μ§€ κΆκΈˆν•©λ‹ˆλ‹€.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ꡬ쑰적으둜 κ°€λŠ₯은 ν•˜μ§€λ§Œ κ΅¬ν˜„ λ³΅μž‘λ„κ°€ λ†’μ•„μ§€λŠ” 단점이 μžˆμ„ κ±°μ—μš”
μƒνƒœκ°€ λ³€κ²½λ λ•Œλ§ˆλ‹€ λͺ¨λ“  Participant κΉŒμ§€ μƒˆλ‘­κ²Œ λ°˜ν™˜ν•΄μ•Όν•˜λ‹ˆκΉŒμš” πŸ˜…

제 κΈ°μ€€μ—μ„œλŠ” μ˜€λ²„μ—”μ§€λ‹ˆμ–΄λ§ ν•˜μ§€μ•Šκ³  μ μ ˆν•˜κ²Œ κ΅¬ν˜„ν•΄μ£Όμ…¨λ‹€κ³  μƒκ°ν•˜μ—¬
ν•΄λ‹Ή 뢀뢄도 κ³ λ―Όν•΄λ³΄μ…¨λŠ”μ§€ κΆκΈˆν–ˆμ–΄μš”!

Comment on lines +79 to +85
private void hitByDecision(Deck deck, Player player) {
if (inputView.readHitStand(player)) {
player.draw(deck.draw());
return;
}
player.stay();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

νžˆνŠΈλƒ μŠ€νƒ λ“œλƒμ— 따라 어떀것이 ν˜ΈμΆœλ μ§€λŠ” 도메인 μͺ½μ— 맑겨봐도 λ˜κ² λ„€μš”

boolean isHit = inputView.readHitStand(player);
도메인 객체 호좜(isHit);

Comment on lines +44 to +46
List<PlayerResult> playerResults = blackjackGame.collectPlayerResults();

List<Profit> profits = blackjackGame.calculatePlayerProfits(playerResults);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

승패 결과와 이읡을 λΆ„λ¦¬ν•΄μ„œ κ³„μ‚°ν•˜λŠ” λ©”μ„œλ“œλ₯Ό ν˜ΈμΆœν•˜λŠ”κ΅°μš”
λ‘˜μ€ 크게 보면 λΈ”λž™μž­μ˜ κ²Œμž„ 결과라고 μƒκ°ν•΄μš”

ν˜„μž¬ ν•΄λ‹Ή λ©”μ„œλ“œ λ‘˜μ€ μˆœμ„œλŒ€λ‘œ ν˜ΈμΆœν•˜λŠ”κ²ƒμ΄ μ „μ œμ‘°κ±΄μœΌλ‘œ λ§Œλ“€μ–΄μ§„ 것 κ°™μ•„μš”
κ·Έλ ‡λ‹€λ©΄ 호좜 μˆœμ„œ ν˜Ήμ€ μ‹œκ°„ 흐름에 결합이 생긴것인데
이런 결합이 μžˆλŠ”κ±°λΌλ©΄ blackjackGame λ‚΄λΆ€μ—μ„œ 흐름을 λ§Œλ“€μ–΄μ£ΌλŠ”κ²ƒμ΄ μ’‹λ‹€κ³  μƒκ°ν•΄μš”
μ œμ œλŠ” μ–΄λ–»κ²Œ μƒκ°ν•˜μ‹œλ‚˜μš”?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ™μ˜ν•©λ‹ˆλ‹€. λ©”μ„œλ“œκ°„ 결합도가 μƒκ²Όμ—ˆλ„€μš”.
λ‚΄λΆ€ νλ¦„μœΌλ‘œ κ΄€λ¦¬ν•˜λ©° λ§μ”€λŒ€λ‘œ "κ²°κ³Ό"λΌλŠ” ν•˜λ‚˜μ˜ 큰 νλ¦„μ—μ„œ ν•˜λ‚˜μ˜ λ©”μ„œλ“œλ‘œ μ²˜λ¦¬ν•΄λ„ μ–΄μƒ‰ν•˜μ§€ μ•Šκ² λ‹€λŠ” 생각도 λ“€μ—ˆμŠ΅λ‹ˆλ‹€.

ν˜„μž¬ 이λ₯Ό λ°˜μ˜ν•˜μ—¬ λ¦¬νŒ©ν† λ§ μˆ˜ν–‰ν–ˆμŠ΅λ‹ˆλ‹€!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

외뢀에 μˆœμ„œκ°€ 호좜 μˆœμ„œκ°€ μƒκΈ°λŠ” μ–΄μ©” 수 μ—†λŠ” κ²½μš°κ°€ μžˆκΈ΄ν•œλ°
그런 μΌ€μ΄μŠ€κ°€ μžˆλ‹€λ©΄ μ˜μ‹¬ν•΄λ³΄λŠ”κ²Œ μ’‹μŠ΅λ‹ˆλ‹€! γ…Žγ…Ž
λ‚΄λΆ€μ—μ„œ ν•˜λ‚˜μ˜ νλ¦„μœΌλ‘œ κ°€μ Έκ°€μ•Όν•  것이 외뢀에 λ…ΈμΆœλœ 것은 μ•„λ‹Œκ°€? ν•˜λŠ” μ˜μ‹¬μ΄μš”

Comment on lines +50 to +51
resultView.printCardsWithResult(ParticipantResultDto.toDto(players, dealer));
resultView.printProfits(ProfitsDto.toDto(profits, dealerProfit));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μœ„ μ½”λ©˜νŠΈμ™€ λ™μΌν•œ μ˜λ„λ‘œ
κ²°κ΅­ μŠΉνŒ¨κ²°κ³Όμ™€ 이읡은 κ²Œμž„ κ²°κ³Ό λΌλŠ” 큰 κ°œλ…μœΌλ‘œ ν•¨κ»˜ 응닡해도 λ˜λŠ” 것이라 μƒκ°ν•΄μš” πŸ€”

Copy link
Author

@alstj2384 alstj2384 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 찰리!
ν”Όλ“œλ°± λ°˜μ˜ν•˜μ—¬ μ œμΆœν•©λ‹ˆλ‹€ 😊

this.cards = List.copyOf(hand.getCards());
public static Hand of(List<Card> cards) {
return new Hand(cards);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 뢀뢄은 μ–΄λ–»κ²Œ ν•˜λŠ” 게 μ μ ˆν• μ§€ κ³ λ―Όμž…λ‹ˆλ‹€.

Hand 객체 생성 방법이 "Hand의 볡사본을 λ°˜ν™˜ν•˜λŠ” 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œ"와 "newλ₯Ό μ΄μš©ν•œ 생성" 두 κ°€μ§€κ°€ 혼재되면 μ‚¬μš©μž μž…μž₯μ—μ„œ "뭘 μ‚¬μš©ν•΄μ•Ό ν•˜μ§€?" ν•˜κ³  ν—·κ°ˆλ¦΄ μˆ˜λ„ μžˆμ„ κ±° κ°™μ•˜μŠ΅λ‹ˆλ‹€.

κ·Έλž˜μ„œ 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œκ°€ ν¬ν•¨λ˜λŠ” 클래슀의 μƒμ„±μžλŠ” λͺ¨λ‘ 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œλ₯Ό μ‚¬μš©ν•˜λ„λ‘ κ΅¬ν˜„ν–ˆλŠ”λ°μš”.

λ”°λ‘œ νŠΉμˆ˜ν•œ λͺ©μ μ΄ μžˆλŠ” μƒμ„±μžλ§Œ 정적 νŒ©ν† λ¦¬ λ©”μ„œλ“œλ₯Ό μ΄μš©ν•˜κ³ ,
μ˜ˆμ‹œλ‘œ μ£Όμ‹  것 처럼 기본적인 생성은 newλ₯Ό μ΄μš©ν•œ 생성을 ν•˜λ„λ‘ ν•˜λŠ” 게 μ μ ˆν• κΉŒμš”?
찰리의 의견이 κΆκΈˆν•©λ‹ˆλ‹€ πŸ€”οΏ½

throw new IllegalArgumentException(Card.FIELD_CAN_NOT_BE_NULL);
}
}
protected State state;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λΆˆλ³€μœΌλ‘œ ν•˜λŠ” 방법은 고민을 해보진 λͺ»ν–ˆμŠ΅λ‹ˆλ‹€. 😭

객체λ₯Ό λ°˜ν™˜ν•˜λŠ” μƒνƒœ νŒ¨ν„΄μ—μ„œ final을 μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 게 ꡬ쑰적으둜 κ°€λŠ₯ν•œκ°€? λΌλŠ” ꢁ금증이 λ“€μ–΄μš”.

Participantκ°€ μ•„λ‹ˆλ”λΌλ„ Stateλ₯Ό μ‚¬μš©ν•˜λŠ” μž…μž₯에선 λ³€ν™”λ˜λŠ” State μƒνƒœλ₯Ό μ μš©ν•˜κΈ° μœ„ν•΄μ„  final이 μ—†μ–΄μ•Ό ν•  κ±° 같은데, ν˜Ήμ‹œ 더 μ μ ˆν•œ 방법이 μžˆμ„μ§€ κΆκΈˆν•©λ‹ˆλ‹€.

public boolean decideHitStand(Score boundary) {
return getTotalSum().isLessThanOrEqualTo(boundary);
public boolean isHittable() {
return state.hand().totalSum().isLessThanOrEqualTo(Score.DEALER_HIT_STAND_BOUNDARY);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ°˜μ˜ν•΄μ„œ λ¦¬νŒ©ν† λ§ ν–ˆμŠ΅λ‹ˆλ‹€!

ν•œ κ°€μ§€ κΆκΈˆν•œ 점이 μžˆλŠ”λ°, λ¦¬νŒ©ν† λ§ κ³Όμ •μ—μ„œ λ‚΄λΆ€ 클래슀의 λ©”μ„œλ“œ κ²°κ³Όλ₯Ό κ·ΈλŒ€λ‘œ λ‚΄λ³΄λ‚΄λŠ” κ²½μš°κ°€ μƒκΈ°λŠ”λ°, 이럴 λ•Œλ§ˆλ‹€ 섀계가 잘λͺ»λœκ±΄κ°€? λΌλŠ” 생각이 λ“­λ‹ˆλ‹€. λ¬Όλ‘  ν•΄λ‹Ή ν΄λž˜μŠ€μ—μ„œ μˆ˜ν–‰ν•  수 μžˆλŠ” 둜직이 ν¬ν•¨λœλ‹€λ©΄ κ·Έ 자체둜 μ˜λ―Έκ°€ μžˆκ² μ§€λ§Œ, κ·Έλ ‡μ§€ μ•Šμ€ 경우(λž˜ν•‘λ§Œ ν•˜λŠ” 경우)에 μ°μ°ν•œ λŠλ‚Œμ΄ λ“œλŠ”λ°μš”.

클래슀의 결괏값을 λž˜ν•‘λ§Œ ν•˜λŠ” κ²½μš°λŠ” μ–΄μ©” 수 없이 μΌμ–΄λ‚˜λŠ” κ±ΈκΉŒμš”?
ν˜Ήμ€ 섀계가 잘λͺ»λ˜μ—ˆλŠ”μ§€ 검사해 λ³Όλ§Œν•œ 트리거둜 μ‚¬μš©ν•΄ 볼만 ν• κΉŒμš”?
λ¬Όλ‘  정도에 차이가 μžˆκ² μ§€λ§Œ, μ°μ°ν•œ λŠλ‚Œμ΄ λ“œλŠ” 경우 μ–΄λ–»κ²Œ 생각해 보면 쒋을지 κΆκΈˆν•΄μš”.

Comment on lines +44 to +46
List<PlayerResult> playerResults = blackjackGame.collectPlayerResults();

List<Profit> profits = blackjackGame.calculatePlayerProfits(playerResults);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ™μ˜ν•©λ‹ˆλ‹€. λ©”μ„œλ“œκ°„ 결합도가 μƒκ²Όμ—ˆλ„€μš”.
λ‚΄λΆ€ νλ¦„μœΌλ‘œ κ΄€λ¦¬ν•˜λ©° λ§μ”€λŒ€λ‘œ "κ²°κ³Ό"λΌλŠ” ν•˜λ‚˜μ˜ 큰 νλ¦„μ—μ„œ ν•˜λ‚˜μ˜ λ©”μ„œλ“œλ‘œ μ²˜λ¦¬ν•΄λ„ μ–΄μƒ‰ν•˜μ§€ μ•Šκ² λ‹€λŠ” 생각도 λ“€μ—ˆμŠ΅λ‹ˆλ‹€.

ν˜„μž¬ 이λ₯Ό λ°˜μ˜ν•˜μ—¬ λ¦¬νŒ©ν† λ§ μˆ˜ν–‰ν–ˆμŠ΅λ‹ˆλ‹€!

Copy link

@Gomding Gomding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” 제제!
μΉ˜μ—΄ν•œ κ³ λ―Όκ³Ό ν•¨κ»˜ λ―Έμ…˜ μ§„ν–‰ν•˜λŠλΌ κ³ μƒν•˜μ…¨μ–΄μš” πŸŽ‰
λ―Έμ…˜μ€ 이만 λ¨Έμ§€ν•˜κ² μŠ΅λ‹ˆλ‹€!

μ•žμœΌλ‘œ μš°ν…Œμ½” μƒν™œλ„ λ‹€μŒ λ―Έμ…˜λ„ ν™”μ΄νŒ…μž…λ‹ˆλ‹€ πŸ’ͺ

this.cards = List.copyOf(hand.getCards());
public static Hand of(List<Card> cards) {
return new Hand(cards);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고민을 μ μ ˆν•˜κ²Œ ν•΄μ£Όμ…¨λ„€μš”!
νŒ€μ˜ μ»¨λ²€μ…˜, μ·¨ν–₯에 따라 λ‹¬λΌμ§ˆ κ·œμΉ™μœΌλ‘œ λ³΄μ΄λ„€μš” γ…Žγ…Ž
일단 μ €λŠ” 기본적인 ν•„λ“œλ₯Ό λ°›μ•„μ„œ μƒμ„±ν•˜λŠ” 것이라면 new λ₯Ό μ΄μš©ν•œ μƒμ„±μžλ₯Ό μ‚¬μš©ν•˜λŠ”κ²Œ λͺ…ν™•ν•˜λ‹€κ³  μƒκ°ν•΄μš”!

그런데 new μƒμ„±μžλ₯Ό private 으둜 닫아두신것을 이제 λ΄€λ„€μš” πŸ˜“
λ§Œμ•½ private 으둜 닫아두셨닀면 μ €λŠ” 제제의 κ΅¬ν˜„λŒ€λ‘œ 정적 νŒ©ν† λ¦¬λ§Œ μ œκ³΅ν•œλ‹€! λΌλŠ” λ°©ν–₯도 λ™μ˜ν•©λ‹ˆλ‹€

ν˜Όλž€μ„ λ“œλ €μ„œ μ£„μ†‘ν•΄μš” πŸ₯²πŸ₯²πŸ₯²

public boolean decideHitStand(Score boundary) {
return getTotalSum().isLessThanOrEqualTo(boundary);
public boolean isHittable() {
return state.hand().totalSum().isLessThanOrEqualTo(Score.DEALER_HIT_STAND_BOUNDARY);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고민을 ν•΄λ³Ό 수 μžˆλŠ” λΆ€λΆ„μ΄λ„€μš” γ…Žγ…Ž
섀계에 λŒ€ν•΄ 점검을 ν•΄λ³Ό 수 μžˆλŠ” λŠλ‚Œμ΄λΌ μƒκ°ν•΄μš”!
λ‹€λ§Œ λ””λ―Έν„° λ²•μΉ™μ˜ 탄생 배경에 λŒ€ν•΄μ„œλŠ” 이미 μ•Œκ³  계싀거라 μƒκ°ν•΄μš” :)
세뢀적인 것에 λŒ€ν•œ μ˜μ‘΄μ„ μ—†μ• κ³  ν˜‘λ ₯ν•˜λŠ” κ°μ²΄ν•˜κ³ λ§Œ λŒ€ν™”λ₯Ό ν•˜λŠ”κ²ƒμ΄μ£ 

세뢀적인 것을 μ•Œκ²Œλ˜λ©΄ μ–΄λ–€ 단점이 μžˆλŠ”μ§€λŠ” μ œμ œλ„ μ•Œκ³  κ³„μ‹œκ² μ£ ? πŸ˜„

throw new IllegalArgumentException(Card.FIELD_CAN_NOT_BE_NULL);
}
}
protected State state;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ꡬ쑰적으둜 κ°€λŠ₯은 ν•˜μ§€λ§Œ κ΅¬ν˜„ λ³΅μž‘λ„κ°€ λ†’μ•„μ§€λŠ” 단점이 μžˆμ„ κ±°μ—μš”
μƒνƒœκ°€ λ³€κ²½λ λ•Œλ§ˆλ‹€ λͺ¨λ“  Participant κΉŒμ§€ μƒˆλ‘­κ²Œ λ°˜ν™˜ν•΄μ•Όν•˜λ‹ˆκΉŒμš” πŸ˜…

제 κΈ°μ€€μ—μ„œλŠ” μ˜€λ²„μ—”μ§€λ‹ˆμ–΄λ§ ν•˜μ§€μ•Šκ³  μ μ ˆν•˜κ²Œ κ΅¬ν˜„ν•΄μ£Όμ…¨λ‹€κ³  μƒκ°ν•˜μ—¬
ν•΄λ‹Ή 뢀뢄도 κ³ λ―Όν•΄λ³΄μ…¨λŠ”μ§€ κΆκΈˆν–ˆμ–΄μš”!

Comment on lines +44 to +46
List<PlayerResult> playerResults = blackjackGame.collectPlayerResults();

List<Profit> profits = blackjackGame.calculatePlayerProfits(playerResults);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

외뢀에 μˆœμ„œκ°€ 호좜 μˆœμ„œκ°€ μƒκΈ°λŠ” μ–΄μ©” 수 μ—†λŠ” κ²½μš°κ°€ μžˆκΈ΄ν•œλ°
그런 μΌ€μ΄μŠ€κ°€ μžˆλ‹€λ©΄ μ˜μ‹¬ν•΄λ³΄λŠ”κ²Œ μ’‹μŠ΅λ‹ˆλ‹€! γ…Žγ…Ž
λ‚΄λΆ€μ—μ„œ ν•˜λ‚˜μ˜ νλ¦„μœΌλ‘œ κ°€μ Έκ°€μ•Όν•  것이 외뢀에 λ…ΈμΆœλœ 것은 μ•„λ‹Œκ°€? ν•˜λŠ” μ˜μ‹¬μ΄μš”

@Gomding Gomding merged commit d5d09cc into woowacourse:alstj2384 Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants