Skip to content

[๐Ÿš€ ์‚ฌ์ดํด1 - ๋ฏธ์…˜ (๋ธ”๋ž™์žญ ๊ฒŒ์ž„ ์‹คํ–‰)] ์ดํ”„ ๋ฏธ์…˜ ์ œ์ถœํ•ฉ๋‹ˆ๋‹ค.#1012

Open
jihwankim128 wants to merge 19 commits intowoowacourse:jihwankim128from
jihwankim128:step1

Conversation

@jihwankim128
Copy link

@jihwankim128 jihwankim128 commented Mar 8, 2026

๊ฐœ์š”

์•ˆ๋…•ํ•˜์„ธ์š” ์ œ๋‚˜, ์ด๋ฒˆ์— ๋ธ”๋ž™์žญ ๋ฏธ์…˜์„ ์ˆ˜ํ–‰ํ•˜๊ฒŒ๋œ ์ดํ”„๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

ํŽ˜์–ดํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ฒ˜์Œ ์ง„ํ–‰ํ•˜๋ฉด์„œ ๋„ค๋น„๊ฒŒ์ดํ„ฐ์˜ ๋„์›€์„ ๋ฐ›์•„, ๋” ๋„“์€ ์‹œ์•ผ๋กœ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์— ์ž„ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ๋ฐฐ์› ์Šต๋‹ˆ๋‹ค. ์™„์„ฑ๋„๋Š” ๋‚ฎ์„ ์ˆ˜ ์žˆ๊ฒ ์ง€๋งŒ step2์—์„œ ๋” ๋†’์€ ์™„์„ฑ๋„๋กœ ๋ฆฌํŒฉํ† ๋งํ•˜๊ธฐ ์œ„ํ•ด ๋งŽ์€ ์กฐ์–ธ์„ ๋ฐ›๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค ๐Ÿ˜Š

์•„๋‚Œ์—†์ด ์กฐ์–ธ์„ ์ฃผ์‹œ๋ฉด ์„ฑ์žฅ์— ํฐ ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์•„์š”!

  • ๊ทธ๋ฆฌ๊ณ  ์ฒ˜์Œ์— TDD๋ผ๋Š” ์š”๊ตฌ์‚ฌํ•ญ์„ ๋ชป๋ด์„œ ๋‹ค์‹œ ์ง„ํ–‰ํ•˜๋А๋ผ ์‹œ๊ฐ„์ด ์กฐ๊ธˆ ๋Šฆ์—ˆ์Šต๋‹ˆ๋‹ค!! ๊ธฐ์กด ์ปค๋ฐ‹์— ์ด์–ด 7a845ba ํ•ด๋‹น ์ปค๋ฐ‹๋ถ€ํ„ฐ ๋‹ค์‹œ TDD๋กœ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ฒดํฌ ๋ฆฌ์ŠคํŠธ

  • ๋ฏธ์…˜์˜ ํ•„์ˆ˜ ์š”๊ตฌ์‚ฌํ•ญ์„ ๋ชจ๋‘ ๊ตฌํ˜„ํ–ˆ๋‚˜์š”?
  • Gradle test๋ฅผ ์‹คํ–‰ํ–ˆ์„ ๋•Œ, ๋ชจ๋“  ํ…Œ์ŠคํŠธ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ํ†ต๊ณผํ–ˆ๋‚˜์š”?
  • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋˜๋‚˜์š”?

์–ด๋–ค ๋ถ€๋ถ„์— ์ง‘์ค‘ํ•˜์—ฌ ๋ฆฌ๋ทฐํ•ด์•ผ ํ• ๊นŒ์š”?

1. ํŽ˜์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ณผ์ •์—์„œ '์†๋„'์™€ 'ํ•ฉ์˜' ์‚ฌ์ด์˜ ๊ท ํ˜•์„ ์–ด๋–ป๊ฒŒ ์žก์•„์•ผ ํ• ๊นŒ์š”?

ํŽ˜์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ง„ํ–‰ํ•˜๋ฉฐ ์‚ฌ๊ณ  ํ™•์žฅ ๋“ฑ ํ•™์Šต ํšจ๊ณผ๋ฅผ ํฌ๊ฒŒ ๋А๋ผ๊ณ  ์žˆ์ง€๋งŒ, ์˜์‚ฌ๊ฒฐ์ • ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•˜๋Š” '์†๋„ ์ €ํ•˜'๋ฅผ ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐํ•ด์•ผ ํ• ์ง€ ๊ณ ๋ฏผ์ด ๋˜์–ด ์งˆ๋ฌธ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

์ƒํ™ฉ
ํŽ˜์–ด์™€ ํ˜‘์—…ํ•  ๋•Œ ์„œ๋กœ์˜ ์˜๊ฒฌ์ด ์ผ์น˜ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ์ข…์ข… ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
์ €๋Š” 'ํŽ˜์–ด์˜ ๋ฐฉ์‹์„ ์กด์ค‘ํ•˜์ž'๋Š” ์ƒ๊ฐ์œผ๋กœ ์ง„ํ–‰ํ–ˆ์ง€๋งŒ, ์ด ๊ณผ์ •์—์„œ ์ œ๊ฐ€ ์ƒ๊ฐํ•œ ํ๋ฆ„์ด ๊นจ์ ธ ๋‹ค์Œ ์Šคํ…์— ๋Œ€ํ•ด ์„ค๊ณ„๋ฅผ ์žฌ๊ตฌ์„ฑํ•˜๊ฑฐ๋‚˜ ์˜๊ฒฌ์„ ์กฐ์œจํ•˜๋Š” ๋ฐ ๋งŽ์€ ์‹œ๊ฐ„(n๋ถ„+)์„ ํ• ์• ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๊ฒฐ๊ณผ์ ์œผ๋กœ ๊ฐœ๋ฐœ ์†๋„๊ฐ€ ๋”๋ŽŒ์ง€๊ณ , ๋‹ค์‹œ ํ๋ฆ„์„ ์žฌ์„ค๊ณ„ํ•˜๋Š” ๊ณผ์ •์—์„œ ํ”ผ๋กœ๊ฐ์„ ๋А๋ผ๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค.

๊ณ ๋ฏผ
๋‹จ์ˆœํžˆ ์ œ ์˜๊ฒฌ์„ ์„ค๋“ํ•˜๊ฑฐ๋‚˜ ๊ฐ•์š”ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, ๊ฑด๊ฐ•ํ•˜๊ฒŒ ํ•ฉ์˜์ ์„ ์ฐพ๋Š” ๊ณผ์ • ์ž์ฒด๊ฐ€ ํŽ˜์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ ํ•ต์‹ฌ์ด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ๊ณผ์ •์ด ๋„ˆ๋ฌด ๊ธธ์–ด์งˆ ๋•Œ ์–ด๋–ป๊ฒŒ ์กฐ์œจํ•ด์•ผ ํ• ์ง€ ๊ฐ์ด ์ž˜ ์žกํžˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์งˆ๋ฌธ

  • ์‹ค๋ฌด์—์„œ๋„ ํŽ˜์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ง„ํ–‰ํ•˜๋‚˜์š”?
    • ์ง„ํ–‰ํ•œ๋‹ค๋ฉด ์ด๋ ‡๊ฒŒ ์˜์‚ฌ๊ฒฐ์ •์—์„œ ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๋ฉด ์–ด๋–ป๊ฒŒ ํšจ์œจ์ ์œผ๋กœ ํ•ด๊ฒฐํ•˜๋‚˜์š”?
  • ์•„๋‹ˆ๋ฉด ์ด '๋”๋ŽŒ์ง€๋Š” ๊ณผ์ •' ์ž์ฒด๊ฐ€ ํŽ˜์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐ์—์„œ ๋‹น์—ฐํžˆ ๊ฒช์–ด์•ผ ํ•  ํ•™์Šต์˜ ์ผ๋ถ€์ผ๊นŒ์š”? ๋ฉ˜ํ† ๋‹˜์˜ ๊ฒฝํ—˜๋‹ด์ด ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

2. ์ƒ์†์„ ํ†ตํ•œ ์žฌ์‚ฌ์šฉ๊ณผ LSP(๋ฆฌ์Šค์ฝ”ํ”„ ์น˜ํ™˜ ์›์น™)์— ๋Œ€ํ•œ ๊ณ ์ฐฐ

๋ธ”๋ž™์žญ ๋ฏธ์…˜์„ ๊ตฌํ˜„ํ•˜๋ฉฐ Dealer์™€ Player ์‚ฌ์ด์˜ ๊ณตํ†ต์ ์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ์ƒ์†์„ ํ™œ์šฉํ–ˆ์œผ๋‚˜, ์ด ๊ณผ์ •์—์„œ ๊ฐ์ฒด์˜ ์ฑ…์ž„๊ณผ LSP ์‚ฌ์ด์—์„œ ๊ณ ๋ฏผ์ด ๋ฐœ์ƒํ•ด ์งˆ๋ฌธ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

์ƒํ™ฉ

์ดˆ๊ธฐ ์„ค๊ณ„์—์„œ๋Š” Dealer๊ฐ€ Player์˜ ์†์„ฑ(์ด๋ฆ„, ์นด๋“œ ๊ด€๋ฆฌ, ์ ์ˆ˜ ๊ณ„์‚ฐ)์„ ๊ณต์œ ํ•œ๋‹ค๋Š” ์ ์— ์ง‘์ค‘ํ•ด ์ƒ์† ๊ด€๊ณ„(Dealer extends Player)๋ฅผ ๋งบ์—ˆ์Šต๋‹ˆ๋‹ค. ์ดํ›„ "์‹ค์ œ ์„ธ๊ณ„์—์„œ ๋”œ๋Ÿฌ๊ฐ€ ์นด๋“œ๋ฅผ ๋‚˜๋ˆ ์ค€๋‹ค"๋Š” ์ง๊ด€์„ ๋ฐ˜์˜ํ•˜๊ธฐ ์œ„ํ•ด, ๊ธฐ์กด CardDispenser์— ์žˆ๋˜ '๋ฑ ๊ด€๋ฆฌ'์™€ '์นด๋“œ ๋ถ„๋ฐฐ' ์ฑ…์ž„์„ Dealer์—๊ฒŒ ํ†ตํ•ฉํ•˜๋Š” ๋ฆฌํŒฉํ† ๋ง์„ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค. (commit: d677afa)

๊ณ ๋ฏผ

๋ฆฌํŒฉํ† ๋ง ํ›„, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์„ค๊ณ„์  ๋ชจ์ˆœ์„ ๋ฐœ๊ฒฌํ–ˆ์Šต๋‹ˆ๋‹ค.

  • Player๋ฅผ ๊ธฐ๋Œ€ํ•˜๋Š” ๊ณณ์— Dealer๋ฅผ ๋„ฃ์—ˆ์„ ๋•Œ, ์ง„ํ–‰์ž๋กœ์„œ์˜ '๋ฑ' ์ƒํƒœ๊ฐ€ ์˜๋„์น˜ ์•Š๊ฒŒ ๊ณต์œ ๋ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ, ํ–ฅํ›„ '๋ฒ ํŒ…' ๊ธฐ๋Šฅ์ด ์ถ”๊ฐ€๋œ๋‹ค๋ฉด Player์˜ ์ž์‹์ธ Dealer๋Š” ํ•ด๋‹น ๊ธฐ๋Šฅ์„ ๊ฑฐ๋ถ€(Exception ๋“ฑ)ํ•ด์•ผ๋งŒ ํ•˜๋ฉฐ, ์ด๋Š” ๋ช…๋ฐฑํ•œ LSP ์œ„๋ฐ˜์œผ๋กœ ์ด์–ด์งˆ ๊ฒƒ์ด๋ผ ํŒ๋‹จํ–ˆ์Šต๋‹ˆ๋‹ค.
  • YAGNI(You Ain't Gonna Need It) ์›์น™์— ๋”ฐ๋ผ "์•„์ง ์ผ์–ด๋‚˜์ง€ ์•Š์€ ๋ฒ ํŒ… ๊ธฐ๋Šฅ์„ ์œ„ํ•ด ์ถ”์ƒํ™” ๊ณ„์ธต์„ ๋ฏธ๋ฆฌ ๋งŒ๋“œ๋Š” ๊ฒƒ์ด ๊ณผ์œ ๋ถˆ๊ธ‰์ธ๊ฐ€?"๋ผ๋Š” ์˜๊ตฌ์‹ฌ์ด ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ํ˜„์žฌ ๊ตฌ์กฐ๋Š” Dealer์—๊ฒŒ '์ฐธ๊ฐ€์ž'์™€ '์ง„ํ–‰์ž'๋ผ๋Š” ๋‘ ๊ฐ€์ง€ ์ฑ…์ž„์ด ์„ž์—ฌ ์žˆ์–ด SRP ์ธก๋ฉด์—์„œ๋„ ๋ถˆ์•ˆ์ •ํ•ด ๋ณด์ž…๋‹ˆ๋‹ค.

์งˆ๋ฌธ

  • ์ถ”์ƒํ™”์˜ ์ ์ ˆํ•œ ์‹œ์ : YAGNI๋ฅผ ์ง€ํ‚ค๋ฉด์„œ๋„ ๋ฏธ๋ž˜์˜ LSP ์œ„๋ฐ˜์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด, ์ง€๊ธˆ ๋‹จ๊ณ„์—์„œ abstract class Participant์™€ ๊ฐ™์€ ์ถ”์ƒํ™” ๊ณ„์ธต์„ ๋„์ž…ํ•˜์—ฌ Dealer์™€ Player๋ฅผ ํ˜•์ œ ๊ด€๊ณ„๋กœ ๋ถ„๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ํƒ€๋‹นํ•œ ์„ ํƒ์ผ๊นŒ์š”?
  • ์ง๊ด€ vs ์„ค๊ณ„ ์›์น™: ํ˜„์‹ค ์„ธ๊ณ„์˜ ์—ญํ• (๋”œ๋Ÿฌ์˜ ๋ถ„๋ฐฐ)์„ ์ฝ”๋“œ์— ๋…น์—ฌ๋‚ผ ๋•Œ, ๋„๋ฉ”์ธ ๋ชจ๋ธ์˜ ์ง๊ด€์„ฑ์„ ์œ„ํ•ด ์›์น™(LSP, SRP)์„ ์–ด๋А ์ •๋„ ํƒ€ํ˜‘ํ•ด๋„ ๊ดœ์ฐฎ์€์ง€, ํ˜น์€ ์›์น™์„ ๊ณ ์ˆ˜ํ•˜์—ฌ '๋ถ„๋ฐฐ๊ธฐ'์™€ ๊ฐ™์€ ๊ธฐ๋Šฅ์  ๊ฐ์ฒด๋ฅผ ์œ ์ง€ํ•˜๋Š” ๊ฒƒ์ด ์žฅ๊ธฐ์ ์œผ๋กœ ์˜ณ์€ ๋ฐฉํ–ฅ์ธ์ง€ ๋ฉ˜ํ† ๋‹˜์˜ ๊ฒฌํ•ด๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

3. ์ปจํŠธ๋กค๋Ÿฌ์˜ ์ฑ…์ž„ ๋ฒ”์œ„์™€ ๋„๋ฉ”์ธ ๊ฐ์ฒด(BlackjackGame)์— ๋Œ€ํ•œ ๊ณ ๋ฏผ

MVC ํŒจํ„ด์„ ์ ์šฉํ•˜๋ฉฐ Controller๊ฐ€ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์˜ ์ƒ์„ธํ•œ ํ๋ฆ„์„ ์–ด๋””๊นŒ์ง€ ์ œ์–ดํ•ด์•ผ ํ•˜๋Š”์ง€, ๊ทธ๋ฆฌ๊ณ  ์ด๋ฅผ ๋„๋ฉ”์ธ ๊ฐ์ฒด๋กœ ์บก์Аํ™”ํ•˜๋Š” ๊ธฐ์ค€์— ๋Œ€ํ•ด ๊ณ ๋ฏผ์ด ์ƒ๊ฒจ ์งˆ๋ฌธ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

์ƒํ™ฉ

ํ˜„์žฌ BlackjackController๋Š” ๋‹จ์ˆœํžˆ ๋ชจ๋ธ๊ณผ ๋ทฐ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ์—ญํ• ์„ ๋„˜์–ด, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ธ”๋ž™์žญ ํ๋ฆ„์„ ์ง์ ‘ ์ œ์–ดํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

  • ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ ๊ฒฐ๊ณผ์— ๋”ฐ๋ผ ์นด๋“œ๋ฅผ ์ถ”๊ฐ€๋กœ ๋ฝ‘๋Š” while ๋ฃจํ”„์™€ ์กฐ๊ฑด๋ฌธ(canHitMore)์ด ์ปจํŠธ๋กค๋Ÿฌ์— ์œ„์น˜
  • ๋”œ๋Ÿฌ๊ฐ€ 16์  ์ดํ•˜์ผ ๋•Œ ์ž๋™์œผ๋กœ ์นด๋“œ๋ฅผ ๋ฝ‘๋Š” ๋กœ์ง
  • ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ Dealer, Player, Deck ๋“ฑ์„ ๊ฐ๊ฐ ๊ด€๋ฆฌํ•˜๋ฉฐ ์ด๋“ค์˜ ์ƒํ˜ธ์ž‘์šฉ์„ ์ผ์ผ์ด ์ง€์‹œํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

๊ณ ๋ฏผ

์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ๋šฑ๋šฑํ•ด์ง€๋Š” ํ˜„์ƒ์„ ํ”ผํ•˜๊ณ  ์‹ถ์—ˆ์ง€๋งŒ, ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ(InputView)์— ๋”ฐ๋ผ ๋„๋ฉ”์ธ ์ƒํƒœ๊ฐ€ ๋ณ€ํ•˜๋Š” ๊ตฌ์กฐ(์˜ˆ: ์นด๋“œ๋ฅผ ๋” ๋ฐ›์„์ง€ ๋ง์ง€ ๊ฒฐ์ •, ๋„๋ฉ”์ธ ์ฒ˜๋ฆฌ์— ๋”ฐ๋ฅธ ์ฆ‰๊ฐ ์ถœ๋ ฅ ๋“ฑ)๋•Œ๋ฌธ์— ๋กœ์ง์„ ๋„๋ฉ”์ธ์œผ๋กœ ์™„์ „ํžˆ ๋ฐ€์–ด ๋„ฃ๋Š” ๋ฐ ์–ด๋ ค์›€์„ ๊ฒช์—ˆ์Šต๋‹ˆ๋‹ค.

BlackjackGame๊ณผ ๊ฐ™์€ ๋ณ„๋„์˜ ๋„๋ฉ”์ธ ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค์–ด Dealer, Players๋ฅผ ๊ฐ์‹ธ๊ณ  ๊ฒŒ์ž„์˜ ์ง„ํ–‰ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด MVC ํŒจํ„ด์˜ ๋ณธ์งˆ์— ๋” ๊ฐ€๊นŒ์šด ๊ฒƒ์ธ์ง€, ์•„๋‹ˆ๋ฉด ํ˜„์žฌ์ฒ˜๋Ÿผ ํ๋ฆ„์„ ๋ช…์‹œ์ ์œผ๋กœ ๋ณด์—ฌ์ฃผ๋Š” ์ปจํŠธ๋กค๋Ÿฌ ๊ตฌ์กฐ๋„ ๊ดœ์ฐฎ์€๊ฑด์ง€ ๊ณ ๋ฏผ์ด ๋์Šต๋‹ˆ๋‹ค.

์งˆ๋ฌธ

  • ๋ฉ˜ํ† ๋‹˜์ด ์ƒ๊ฐํ•˜์‹œ๋Š” ์ปจํŠธ๋กค๋Ÿฌ์˜ '์„ '์€ ์–ด๋””๊นŒ์ง€์ธ๊ฐ€์š”? ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์˜ ์ˆœ์„œ(Workflow)๋ฅผ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ์•Œ๊ณ  ์žˆ๋Š” ๊ฒƒ์ด ์ž์—ฐ์Šค๋Ÿฌ์šด ๊ฒƒ์ธ์ง€, ์•„๋‹ˆ๋ฉด ์ด ์ˆœ์„œ์กฐ์ฐจ ๋„๋ฉ”์ธ ๋‚ด๋ถ€๋กœ ์ˆจ๊ธฐ๋Š”๊ฒŒ ๋” ์ข‹์€๊ฑด์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.
  • while๋ฌธ ์•ˆ์—์„œ InputView๋ฅผ ํ˜ธ์ถœํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ์ฒ˜๋Ÿผ, ๋„๋ฉ”์ธ ๋กœ์ง๊ณผ UI ์ธํ„ฐ๋ž™์…˜์ด ๋ˆ๋ˆํ•˜๊ฒŒ ๊ฒฐํ•ฉ๋  ๋•Œ ์ด๋ฅผ ๊ตฌ์กฐ์ ์œผ๋กœ ๊น”๋”ํ•˜๊ฒŒ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ๋ฉ˜ํ† ๋‹˜๋งŒ์˜ ๋…ธํ•˜์šฐ๊ฐ€ ์žˆ์œผ์‹ ๊ฐ€์š”? (์˜ˆ: ํ•จ์ˆ˜ํ˜• ์ธํ„ฐํŽ˜์ด์Šค ํ™œ์šฉ ๋“ฑ)
  • BlackjackGame์ด๋ผ๋Š” ๊ฐ์ฒด๋ฅผ ๋„์ž…ํ•œ๋‹ค๋ฉด, ์ด๋ฅผ ์ƒํƒœ๋ฅผ ๊ฐ€์ง„ ๋„๋ฉ”์ธ ๊ฐ์ฒด๋กœ ์„ค๊ณ„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์„๊นŒ์š”, ์•„๋‹ˆ๋ฉด ํ–‰์œ„๋งŒ ๊ฐ€์ง„ ์„œ๋น„์Šค ๋ ˆ์ด์–ด๋กœ ์„ค๊ณ„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์„๊นŒ์š”?

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

mvg01 and others added 14 commits March 4, 2026 16:59
* ์ฐธ๊ฐ€์ž ์ถ”๊ฐ€ ์นด๋“œ ์˜คํ”ˆ ํ›„ ํ•œ ๋ฒˆ๋งŒ ์นด๋“œ ๋ชฉ๋ก์„ ์ถœ๋ ฅํ•˜๋„๋ก ์ˆ˜์ •
์—ฌ๊ธฐ์„œ๋ถ€ํ„ฐ TDD๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
* enum ๋ฏธ์‚ฌ์šฉ ๋ฉ”์„œ๋“œ ์ œ๊ฑฐ
* ๋ฏธ์‚ฌ์šฉ ํด๋ž˜์Šค ์ œ๊ฑฐ
@yenawee yenawee self-requested a review March 9, 2026 12:06
Copy link

@yenawee yenawee left a comment

Choose a reason for hiding this comment

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

์•ˆ๋…•ํ•˜์„ธ์š” ์ดํ”„! ๋ธ”๋ž™์žญ 1๋‹จ๊ณ„ ์ž˜ ๊ตฌํ˜„ํ•ด์ฃผ์…จ๋„ค์š”.
ํ•œ๋ฒˆ ๋ณด์™„ํ•˜๊ณ  ๋„˜์–ด๊ฐˆ ์ ๋“ค ์ฝ”๋ฉ˜ํŠธ๋กœ ๋‚จ๊ฒจ๋†จ์œผ๋‹ˆ ํ™•์ธํ•ด์ฃผ์„ธ์š”๐Ÿ™‚

  • ํŽ˜์–ด ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ณผ์ •์—์„œ '์†๋„'์™€ 'ํ•ฉ์˜' ์‚ฌ์ด์˜ ๊ท ํ˜•์„ ์–ด๋–ป๊ฒŒ ์žก์•„์•ผ ํ• ๊นŒ์š”?
    ์‹ค๋ฌด์—์„œ๋„ ์šฐํ…Œ์ฝ” ๋ฐฉ์‹์ฒ˜๋Ÿผ์€ ์•„๋‹ˆ์ง€๋งŒ ํŽ˜์–ด๋ฅผ ๊ฝค ๋งŽ์ด ์ง„ํ–‰ํ•˜๋Š” ๊ฑฐ ๊ฐ™์•„์š”. ๋ณดํ†ต ์‹ ๊ทœ ํŒ€์› ์˜จ๋ณด๋”ฉ ์‹œ, ํ•ต์‹ฌ ๋กœ์ง์ด๋‚˜ ๋ณต์žกํ•œ ๋น„์ฆˆ๋‹ˆ์Šค ์•„ํ‚คํ…์ฒ˜ ์„ค๊ณ„ ์‹œ ํŽ˜์–ด๋ฅผ ํ–ˆ์—ˆ๋˜ ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํŽ˜์–ด๋ฅผ ํ•˜๋ฉด ๊ฐœ๋ฐœ์†๋„๊ฐ€ ๋”๋ŽŒ์ง€๋Š” ๊ฑด ๋งž์•„์š”. ๊ทธ๋ ‡์ง€๋งŒ ์ฝ”๋“œ๋ฆฌ๋ทฐ+์˜๊ฒฌ ๋‚˜๋ˆ„๋Š” ๋ฒ• ๋ฐฐ์šฐ๊ธฐ+๋””๋ฒ„๊น… ๋“ฑ ๋‚˜์ค‘์— PR ๋ฆฌ๋ทฐํ•˜๊ณ  ํ”ผ๋“œ๋ฐฑ์„ ๋ฐ›์œผ๋ฉด์„œ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๋Š” ์‹œ๊ฐ„์€ ๋‹จ์ถ•๋  ์ˆ˜ ์žˆ๋‹ค๋Š” ์žฅ์ ๋„ ์žˆ์„ ๊ฑฐ ๊ฐ™์•„์š”. ์„œ๋กœ ์‹œ๊ฐ„์„ ์ •ํ•ด๋‘๊ณ  ํ† ๋ก ์„ ํ•˜๊ฑฐ๋‚˜, ํŽ˜์–ด ์‚ฌ์ด์— ๋ช…ํ™•ํ•œ ์—ญํ•  ๋ถ„๋ฆฌ๋ฅผ ํ•ด์„œ ํ’ˆ์งˆ์ด ์•„๋‹Œ ์ทจํ–ฅ์˜ ๋ฌธ์ œ๋ผ๋ฉด ํ˜„์žฌ ํ‚ค๋ณด๋“œ๋ฅผ ์žก๊ณ  ์žˆ๋Š” ์‚ฌ๋žŒ์˜ ์˜๊ฒฌ์„ ๋”ฐ๋ฅด๋Š” ๋ฐฉ์‹๋„ ์ข‹์„ ๊ฑฐ ๊ฐ™์•„์š” :)
  • ์ƒ์†์„ ํ†ตํ•œ ์žฌ์‚ฌ์šฉ๊ณผ LSP(๋ฆฌ์Šค์ฝ”ํ”„ ์น˜ํ™˜ ์›์น™)์— ๋Œ€ํ•œ ๊ณ ์ฐฐ
    ์ด ๋ถ€๋ถ„์€ ์ฝ”๋ฉ˜ํŠธ๋กœ ๋‹ฌ์•„๋’€์œผ๋‹ˆ ํ•œ๋ฒˆ ๊ณ ๋ฏผํ•ด๋ณด์‹œ๋Š”๊ฒŒ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”.
  1. ๋ฒ ํŒ… ๊ธฐ๋Šฅ์ด ์—†์–ด๋„ ๋”œ๋Ÿฌ์™€ ํ”Œ๋ ˆ์ด์–ด๋Š” ๊ทœ์น™์ด ๋‹ค๋ฆ…๋‹ˆ๋‹ค.
  2. ๊ฐ์ฒด์ง€ํ–ฅ์€ ํ˜„์‹ค์˜ ๋ฌผ๋ฆฌ์  ๋ฒ•์น™์„ ๊ทธ๋Œ€๋กœ ์˜ฎ๊ธธ ํ•„์š”๊ฐ€ ์—†์–ด์š”. ๋”œ๋Ÿฌ๋Š” ๊ฒŒ์ž„์„ ์ง„ํ–‰ํ•˜๊ณ  ์นด๋“œ๋ฅผ ๋‚˜๋ˆ ์ฃผ๊ณ  ๊ฒŒ์ž„์˜ ์ฐธ๊ฐ€์ž ์—ญํ• ๋„ ํ•˜์ง€๋งŒ ๋ชจ๋‘ ๋”œ๋Ÿฌ์˜ ์ฑ…์ž„์œผ๋กœ ๋„ฃ๋Š”๋‹ค๋ฉด ๋„ˆ๋ฌด ๋งŽ์€ ์ฑ…์ž„์„ ๊ฐ€์ง€๊ฒŒ ๋˜๊ฒ ์ฃ . ๊ธฐ์กด์— ํ•˜์…จ๋˜ CardDispenser๋ฅผ ๋ถ„๋ฆฌํ•ด ๋‘” ์„ค๊ณ„๊ฐ€ ์˜คํžˆ๋ ค ์ฑ…์ž„ ๋ถ„๋ฆฌ๊ฐ€ ๋” ์ž˜๋œ ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์—ฌ์š”.
  • ์ปจํŠธ๋กค๋Ÿฌ์˜ ์ฑ…์ž„ ๋ฒ”์œ„์™€ ๋„๋ฉ”์ธ ๊ฐ์ฒด(BlackjackGame)์— ๋Œ€ํ•œ ๊ณ ๋ฏผ
    ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์˜ ์ˆœ์„œ๋Š” ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ์•„๋Š” ๊ฒƒ์ด ์ž์—ฐ์Šค๋Ÿฝ๋‹ค๊ณ  ์ƒ๊ฐํ•ด์š”. ํ•˜์ง€๋งŒ ์ƒ์„ธ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์€ ๋„๋ฉ”์ธ ์•ˆ์—์„œ ์ฒ˜๋ฆฌํ•ด์•ผ ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.
    BlackjackGame ์„ ๋„์ž…ํ•œ๋‹ค๋ฉด Dealer, Players ๋“ฑ์„ ๋ณ€์ˆ˜๋กœ ๊ฐ€์ง„ ๊ฐ์ฒด๋กœ ์„ค๊ณ„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค๊ณ  ๋ด์š”. ๊ทธ๋Ÿฌ๋ฉด ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ๋ณ€์ˆ˜๋“ค์„ ๋“ค๊ณ ๋‹ค๋‹ˆ๋ฉฐ ์กฐ์ž‘ํ•  ํ•„์š”๋„ ์—†์–ด ๊ฐ€๋ฒผ์›Œ์งˆ ๊ฑฐ ๊ฐ™๋„ค์š”.
    ๋„๋ฉ”์ธ, UI ๋ถ„๋ฆฌ ๊ด€๋ จํ•ด์„œ๋Š” ํ˜„์žฌ ์ฝ”๋“œ์ฒ˜๋Ÿผ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ๋„๋ฉ”์ธ ์ƒํƒœ๋ฅผ ์ฝ๊ณ , UI ํ˜ธ์ถœํ•œ๋’ค, ๋‹ค์‹œ ๋„๋ฉ”์ธ์„ ์—…๋ฐ์ดํŠธํ•˜๋Š” ์ค‘์žฌ์ž ์—ญํ• ์„ ์ž˜ ํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์—ฌ์š”.

์ถ”๊ฐ€ ๊ถ๊ธˆํ•œ ์  ์žˆ์œผ๋ฉด ์ฝ”๋ฉ˜ํŠธ๋‚˜ ๋””์— ์œผ๋กœ ๋‚จ๊ฒจ์ฃผ์„ธ์š”! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค :D

import java.util.List;
import java.util.stream.Stream;

public class Cards {
Copy link

Choose a reason for hiding this comment

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

blackjack ๊ฒŒ์ž„์—์„  Deck ์ด๋ผ๋Š” ์šฉ์–ด๋ฅผ ์“ฐ๋Š”๋ฐ ๋„ค์ด๋ฐ ๋ฐ”๊ฟ”๋ณด๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?

Copy link
Author

Choose a reason for hiding this comment

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

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! Card๋ผ๋Š” ๊ฐ์ฒด๊ฐ€ ์žˆ์œผ๋ฉด ์ด์— ๋Œ€ํ•œ ์ผ๊ธ‰ ์ปฌ๋ ‰์…˜์€ ๊ทธ๋Œ€๋กœ ๋ณต์ˆ˜ํ˜•์œผ๋กœ ํ‘œํ˜„ํ•˜๊ณ ์ž ํ•˜๋Š” ๊ณ ์ •๊ด€๋…์ด ์žˆ์—ˆ์–ด์š”!
๊ทธ๋Ÿฐ๋ฐ ๋ณด๋‹ค ์กฐ๊ธˆ ๋” ๋ช…ํ™•ํ•œ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ๋” ์ข‹๊ฒ ๊ตฐ์š”..!


import java.util.List;

public class Dealer extends Player {
Copy link

Choose a reason for hiding this comment

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

ํ˜„์žฌ Dealer ๊ฐ€ Player ๋ฅผ ์ƒ์†๋ฐ›๊ณ  ์žˆ์–ด์š”. ๋‘˜์˜ ์—ญํ• ์— ๋Œ€ํ•ด ๋‹ค์‹œ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์„๊ฑฐ๊ฐ™์•„์š”.
์ด ์ƒ์†๊ด€๊ณ„๋ผ๋ฉด "๋”œ๋Ÿฌ๊ฐ€ ํ”Œ๋ ˆ์ด์–ด๋‹ค" ๊ฐ€ ์„ฑ๋ฆฝํ•˜๋Š”์ง€ ์ƒ๊ฐํ•ด๋ณผ๊นŒ์š”?

Tip)
๋‘˜์˜ ๊ณตํ†ต ํ–‰์œ„๋ฅผ ์ƒ๊ฐํ•ด๋ณด๊ณ  ๊ทธ ๊ณตํ†ตํ–‰์œ„๋ฅผ ์ถ”์ถœํ•œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•ด๋ด…์‹œ๋‹ค!

Copy link
Author

Choose a reason for hiding this comment

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

์นด์ง€๋…ธ ๊ฒŒ์ž„ ์ฐธ์—ฌ์ž๋Š” ๋”œ๋Ÿฌ๋‹ค, ์นด์ง€๋…ธ ๊ฒŒ์ž„ ์ฐธ์—ฌ์ž๋Š” ํ”Œ๋ ˆ์ด์–ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ด์— ๋ฐ˜๋Œ€๋˜๋Š” ๋ช…์ œ๋„ ์„ฑ๋ฆฝํ•˜๋Š” ๊ฒƒ ๊ฐ™์•„์š”.
๋ฐ˜๋ฉด ๋”œ๋Ÿฌ๊ฐ€ ํ”Œ๋ ˆ์ด์–ด๋‹ค๋Š” ์™„์ „ํžˆ ๊ฐ™์€ ์—ญํ• ์„ ํ•˜์ง€ ์•Š๋Š” ์ด์ƒ, ๋ช…์ œ๊ฐ€ ์„ฑ๋ฆฝ ๋  ์ˆ˜ ์—†๊ฒ ๋„ค์š” !

์ข‹์€ ํ”ผ๋“œ๋ฐฑ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค :)

return cards.removeLast();
}

public int calculateScore() {
Copy link

Choose a reason for hiding this comment

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

์ ์ˆ˜ ๊ณ„์‚ฐ์ด๋‚˜ Ace ์นด๋“œ ์ˆ˜ ์„ธ๊ธฐ ๋“ฑ์€ ์ฐธ๊ฐ€์ž๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์นด๋“œ๋“ค์—์„œ ํ–‰ํ•ด์ง€๋Š” ํ–‰๋™๋“ค์ด๊ฒ ์ฃ ?

CreateDeck Shuffle, pickCard ๋“ฑ์€ ๋ฑ์—์„œ ํ–‰ํ•ด์ง€๋Š” ํ–‰๋™๋“ค ๊ฐ™์•„์š”.

์ฑ…์ž„์„ ๋ถ„๋ฆฌํ•ด๋ด…์‹œ๋‹ค!

Copy link
Author

Choose a reason for hiding this comment

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

์•ž์„œ Cards ํด๋ž˜์Šค๋ฅผ Deck์œผ๋กœ ๋ณ€๊ฒฝํ•˜๋Š” ์ œ์•ˆ์„ ์ฃผ์…จ๋Š”๋ฐ, ํ•ด๋‹น ๋ฆฌ๋ทฐ๋ฅผ ๋ณด๋‹ˆ Deck ๊ฐ์ฒด๋กœ Cards๋ฅผ ๋”ฐ๋กœ ๊ด€๋ฆฌํ•˜๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ์–ด์š”!

์ตœ์ข…์ ์œผ๋กœ ์•„๋ž˜์™€ ๊ฐ™์€ ๊ทœ์น™์„ ๋งŒ๋“ค๊ฒŒ ๋์Šต๋‹ˆ๋‹ค!

  • Cards๋Š” Card์˜ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค.
  • Deck์€ Card ์ •๋ณด๋“ค๋กœ ๋ธ”๋ž™์žญ๋งŒ์„ ์œ„ํ•œ ๋™์ž‘์„ ๋‹ด๋‹นํ•œ๋‹ค.


private void printGameResult(Dealer dealer, List<Player> players) {
PlayerResult playerResult = PlayerResult.judgeByPlayer(dealer, players);
int winCount = playerResult.countByStatus(GameStatus.LOSE);
Copy link

Choose a reason for hiding this comment

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

๋”œ๋Ÿฌ ๊ด€์  winCount ๊ฒ ์ฃ ? ๊ทธ๋Ÿฌ๋ฉด ๋ณ€์ˆ˜๋ช…์„ ๋ช…ํ™•ํžˆ dealerWinCount ๋ผ๊ณ  ํ•ด๋ณด๋Š”๊ฒŒ ์–ด๋–จ๊นŒ์š”?

Copy link
Author

Choose a reason for hiding this comment

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

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค :)
Lose ์ƒํƒœ์˜ count๋ฅผ ๊ฐ€์ ธ์˜ค๋Š”๋ฐ winCount๋ผ๋Š” ๋ณ€์ˆ˜๋ฅผ ๋ฐ›์œผ๋‹ˆ, ์˜คํ•ด์˜ ์—ฌ์ง€๊ฐ€ ์žˆ๋„ค์š”!

.count();
}

public List<Card> getCard() {
Copy link

Choose a reason for hiding this comment

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

๋‚ด๋ถ€ ๋ฆฌ์ŠคํŠธ๋ฅผ ๋ฐ”๋กœ ๋ฐ˜ํ™˜ํ•œ๋‹ค๋ฉด ์™ธ๋ถ€์—์„œ cards ๋ฅผ ๋ณ€๊ฒฝ์‹œํ‚ฌ ์ˆ˜ ์žˆ์–ด์š”.

๋ณต์‚ฌ ํ›„ ๋ฐ˜ํ™˜ํ•˜๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?

Copy link
Author

Choose a reason for hiding this comment

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

public class Cards {

    private final List<Card> cards;

    public Cards(List<Card> cards) {
        // this.cards = cards;
        this.cards = new ArrayList<>(cards);
    }
...
}

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ฃผ์‹  ํ”ผ๋“œ๋ฐฑ์— ์ด์–ด ์ƒ์„ฑ์ž์—์„œ๋„ ์ƒˆ๋กœ ์ฃผ์†Œ ๊ฐ’์„ ํ• ๋‹นํ•ด ์ €์žฅํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

this.result = result;
}

public static PlayerResult initResult() {
Copy link

Choose a reason for hiding this comment

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

์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๋ฉ”์„œ๋“œ๋Š” ์ œ๊ฑฐํ•ฉ์‹œ๋‹ค

public class Dealer extends Player {

private static final String DEALER_NAME = "๋”œ๋Ÿฌ";
private static final int MINIMUM_STAND_SCORE = 16;
Copy link

Choose a reason for hiding this comment

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

HIT_THRESHOLD / MAX_HIT_SCORE


public static List<String> readPlayerNames() {
System.out.println("๊ฒŒ์ž„์— ์ฐธ์—ฌํ•  ์‚ฌ๋žŒ์˜ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”.(์‰ผํ‘œ ๊ธฐ์ค€์œผ๋กœ ๋ถ„๋ฆฌ)");
return Arrays.stream(readLine().split(","))
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

Choose a reason for hiding this comment

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

์ด๋Ÿฐ ๋ถ€๋ถ„๋„ ํ•ญ์ƒ ๊ณ ๋ฏผ์ด ๋์—ˆ๋Š”๋ฐ, PR์— ์ถ”๊ฐ€ํ•˜์ง€ ๋ชปํ–ˆ๋„ค์š” ใ… ใ… 

์š”๊ตฌ์‚ฌํ•ญ์— ๋ช…์‹œ๋˜์ง€ ์•Š์€ ๊ฒ€์ฆ์„ ์ถ”๊ฐ€ํ•ด์•ผํ•˜๋Š”๊ฐ€?

์ง€๊ธˆ ์ด๋ฆ„์ด๋ผ๋Š” ์ •๋ณด๋Š” ์ €ํฌ๊ฐ€ ์ถ”๊ฐ€ํ•˜๋Š” ๊ทœ์น™์ด ๋  ๊ฒƒ ๊ฐ™์€๋ฐ,
๊ฐœ๋ฐœ์ž๋Š” ํ•„์š”์— ๋”ฐ๋ผ ์š”๊ตฌ์‚ฌํ•ญ์— ๋ช…์‹œ๋˜์ง€ ์•Š์€ ๊ทœ์น™์„ ์ถ”๊ฐ€ํ•ด๋„ ๋˜๋‚˜์š”?

์‹ค๋ฌด์—์„œ๋Š” ๋งˆ์Œ๋Œ€๋กœ ์ถ”๊ฐ€ํ•  ๊ฒฝ์šฐ ์ œ์žฌ๋ฅผ ๋จน๊ฒ ์ง€? ๋ผ๋Š” ์ƒ๊ฐ์œผ๋กœ ์ฃผ์–ด์ง„ ์š”๊ตฌ์‚ฌํ•ญ์— ๊ตฌํ˜„ํ•˜๋Š” ๊ฒƒ์— ์ดˆ์ ์„ ๋’€์Šต๋‹ˆ๋‹ค.
์ œ๋‚˜์˜ ๊ฒฝ์šฐ, ์˜ˆ์ธกํ•  ์ˆ˜ ์žˆ๋Š” ๋ฒ”์œ„์˜ ๊ฒ€์ฆ์€ ๊ทธ๋ƒฅ ์ถ”๊ฐ€ํ•˜์‹œ๋‚˜์š”?!

.toList();
}

public static String readMoreCard(String playerName) {
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

Choose a reason for hiding this comment

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

์•ž์„œ ๋‹ต๋ณ€๊ณผ ๊ฐ™์€ ๋‚ด์šฉ์œผ๋กœ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค :)
#1012 (comment)


private void printGameResult(Dealer dealer, List<Player> players) {
PlayerResult playerResult = PlayerResult.judgeByPlayer(dealer, players);
int winCount = playerResult.countByStatus(GameStatus.LOSE);
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

Choose a reason for hiding this comment

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

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ํ™•์‹คํžˆ ๊ฒฐ๊ณผ ๊ณ„์‚ฐ ํ›„ ์กฐํšŒํ•˜๋„๋ก ํ•˜๋Š”๊ฒŒ ๋” ๊น”๋”ํ•˜๊ฒ ๋„ค์š”...
count๋ผ๋Š” ๋ฉ”์„œ๋“œ๋Š” ๋‹จ์ˆœํžˆ ์กฐํšŒ์šฉ์ด ์•„๋‹ˆ๋ผ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์ฒ˜๋Ÿผ ๋А๊ปด์ง€๋„ค์š”!

์ข‹์€ ํ”ผ๋“œ๋ฐฑ ์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค :)

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.

3 participants