Skip to content

πŸš€ 3단계 - λΈ”λž™μž­(λ”œλŸ¬)#653

Open
moto6 wants to merge 81 commits into
next-step:moto6from
moto6:step3
Open

πŸš€ 3단계 - λΈ”λž™μž­(λ”œλŸ¬)#653
moto6 wants to merge 81 commits into
next-step:moto6from
moto6:step3

Conversation

@moto6

@moto6 moto6 commented Nov 23, 2023

Copy link
Copy Markdown

μ•ˆλ…•ν•˜μ„Έμš” λ¦¬λ·°μ–΄λ‹˜! 3단계 λ―Έμ…˜ PR μš”μ²­λ“œλ¦½λ‹ˆλ‹€!

@malibinYun malibinYun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

3단계 λ―Έμ…˜ 고생 λ§ŽμœΌμ…¨μ–΄μš”!
생각해보면 쒋을 점듀에 μ½”λ©˜νŠΈ λ‚¨κ²¨λ‘μ—ˆμŠ΅λ‹ˆλ‹€.
ν”Όλ“œλ°± 반영 ν›„ λ‹€μ‹œ 리뷰 μš”μ²­ λΆ€νƒλ“œλ €μš”!

Comment thread src/main/kotlin/blackjack/Controller.kt Outdated
Comment on lines 17 to 32
while (participants.isContinue()) {
playingBlackJack(participants)
}
OutputView.result(participants)
OutputView.presentScores(participants)
OutputView.presentResult(Referee.blackJackResult(participants))
}

fun playingBlackJack(participants: Participants) {
participants.participants.forEach {
it.hitOrStand()
participants.players.values.forEach {
it.playing(InputView.askHit(it), ShuffledPack)
}
when (participants.dealer.playing(DealerStrategy(participants.dealer.score()), ShuffledPack)) {
PlayableReaction.HIT -> println("λ”œλŸ¬λŠ” 16μ΄ν•˜λΌ ν•œμž₯의 μΉ΄λ“œλ₯Ό 더 λ°›μ•˜μŠ΅λ‹ˆλ‹€.")
PlayableReaction.STAND -> println("λ”œλŸ¬λŠ” 17이상이라 μΉ΄λ“œλ₯Ό λ°›μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.")
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

λΈ”λž™μž­ 룰이 잘 λ°˜μ˜λ˜μ–΄μžˆμ§€ μ•Šμ•„ λ³΄μ—¬μš”.
μ•„λž˜ 룰듀이 λ°˜μ˜λ˜μ–΄μžˆμ§€ μ•Šμ•„μ„œ, λΈ”λž™μž­ 룰을 λ‹€μ‹œ ν•œ 번 νŒŒμ•…ν•΄λ³΄μ‹  ν›„ ν”„λ‘œμ νŠΈμ— λ°˜μ˜ν•΄λ³΄λŠ” 건 μ–΄λ–¨κΉŒμš”?

  • ν”Œλ ˆμ΄μ–΄λŠ” Bust 되기 μ „κΉŒμ§€ Hitλ₯Ό ν•  수 μžˆλ‹€.
  • λ”œλŸ¬λŠ” ν”Œλ ˆμ΄μ–΄κ°€ λͺ¨λ‘ μ°¨λ‘€λ₯Ό μ§„ν–‰ν•œ λ’€ μΉ΄λ“œ 뽑기λ₯Ό μ§„ν–‰ν•œλ‹€.

Comment thread src/main/kotlin/blackjack/Controller.kt Outdated
@@ -40,7 +40,7 @@ class Cards(

companion object {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cards 객체λ₯Ό λΆˆλ³€ 객체둜 λ§Œλ“€μ–΄λ³΄λŠ” μ‹œλ„λ₯Ό 해보셔도 μ’‹κ² λ„€μš” πŸ™‚

Comment thread src/main/kotlin/blackjack/model/Players.kt Outdated
Comment thread src/main/kotlin/blackjack/model/Referee.kt Outdated
Comment thread src/test/kotlin/blackjack/model/DealerTest.kt Outdated
Comment thread src/test/kotlin/blackjack/model/RefereeTest.kt Outdated
Comment on lines +5 to +19
class ConsoleInputStrategy : PlayingStrategy {

override fun isHit(): Boolean {
println("ν”Œλ ˆμ΄μ–΄λŠ” ν•œμž₯의 μΉ΄λ“œλ₯Ό 더 λ°›κ² μŠ΅λ‹ˆκΉŒ?(μ˜ˆλŠ” y, μ•„λ‹ˆμ˜€λŠ” n)")
return this.isHitInput()
}

private fun isHitInput(): Boolean {
return (readlnOrNull() ?: "") == HIT_COMMAND
}

companion object {
private const val HIT_COMMAND: String = "y"
}
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

이 뢀뢄은 ν”Œλ ˆμ΄μ–΄κ°€ hit 인지, stand 인지 μ½˜μ†”λ‘œ μž…λ ₯을 λ°›μ•„λ“€μ΄λŠ” λΆ€λΆ„μΈλ°μš”, λ„μ €νžˆ 이뢀뢄을 view 클래슀둜 λΆ„λ¦¬ν•΄λ‚Όμˆ˜κ°€ μ—†μ–΄μ„œ 정책에 κ²©λ¦¬ν•΄λ‘μ—ˆμŠ΅λ‹ˆλ‹€.

μ½”λ“œμ μœΌλ‘œλŠ” print, readln 등이 μžˆμ–΄ view λ ˆμ΄μ–΄μ— μœ„μΉ˜ν•΄μ•Όν• κΊΌκ°™λ‹€κ³  μƒκ°λ˜λŠ”λ°μš”,

ν•΄λ‹Ή λΆ€λΆ„μ—μ„œ view λ ˆμ΄μ–΄λ₯Ό μ°Έμ‘°ν•˜λŠ”κ²ƒλ„ μ•ˆμ’‹μ€ λ°©λ²•μ΄λΌμ„œ 일단 μ΄λ ‡κ²Œ μž‘μ„±ν•΄λ‘μ—ˆμŠ΅λ‹ˆλ‹€!

@moto6

moto6 commented Nov 26, 2023

Copy link
Copy Markdown
Author

아직 ν•΄κ²°ν•˜μ§€ λͺ»ν•œ λΆ€λΆ„

  • 치λͺ…적인 버그가 μžˆλŠ”λ°μš” μ•„λž˜μ˜ μŠ€ν¬λ¦°μƒ·κ³Ό 같이 ν”Œλ ˆμ΄μ–΄κ°€ burst 둜 νŒ¨λ°°ν•œ μƒν™©μ—μ„œ WIN 으둜 κ²°κ³Όκ°€ λ‚˜μ˜€κ³  μžˆμŠ΅λ‹ˆλ‹€.
    • ν•΄λ‹ΉλΆ€λΆ„ 원인을 μ°ΎκΈ°μœ„ν•΄ 디버깅도 ν•˜κ³ , ν…ŒμŠ€νŠΈμ½”λ“œλ„ μΆ”κ°€ν–ˆλŠ”λ°, 아직 ν•΄κ²°λ˜μ§€ μ•Šμ•„μ„œ μ½”λ©˜νŠΈ λ‚¨κ²¨λ‘κ² μŠ΅λ‹ˆλ‹€!(λΉ λ₯Έμ‹œμΌλ‚΄μ—, ν˜Ήμ€ λ‹€μŒ λ―Έμ…˜κΉŒμ§€ ν•΄κ²°ν•˜κ² μŠ΅λ‹ˆλ‹€!
image

@moto6

moto6 commented Nov 26, 2023

Copy link
Copy Markdown
Author

ν”Όλ“œλ°± μ£Όμ‹  뢀뢄인 #653 (comment) << ν•΄λ‹Ή 뢀뢄을 κ²€μ¦ν•˜κΈ° μœ„ν•΄μ„œ νƒˆλ½ν•œ ν”Œλ ˆμ΄μ–΄λŠ” μΉ΄λ“œλ₯Ό 뽑을 κΈ°νšŒκ°€ μ£Όμ–΄μ§€μ§€ μ•Šκ³  μ΅œν›„μ˜ ν”Œλ ˆμ΄μ–΄κ°€ λ‚¨μ•„μ„œ μΉ΄λ“œλ₯Ό 뽑을 수 μžˆμ„λ•ŒκΉŒμ§€ κ²½κΈ°λ₯Ό μ§„ν–‰ν•˜λ„λ‘ μˆ˜μ •ν•˜μ˜€μŠ΅λ‹ˆλ‹€!

image

@malibinYun malibinYun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

μ§€κΈˆ ν”Œλ ˆμ΄λ‘œλŠ” μΉ΄λ“œ ν•œ μž₯ 더 λ°›μ•˜μ„ λ•Œ ν˜„μž¬ κ°€μ§„ μΉ΄λ“œ λͺ©λ‘μ΄ ν‘œμ‹œλ˜κ³  μžˆμ§€ μ•Šμ•„ μ›ν™œν•œ ν”Œλ ˆμ΄κ°€ λΆˆκ°€λŠ₯ν•΄λ³΄μ—¬μš”!
μΉ΄λ“œλ₯Ό
또, 말씀해주신 λŒ€λ‘œ Burst μƒνƒœμž„μ—λ„ Win μƒνƒœκ°€ λ‚˜μ˜€κ³  μžˆλŠ” 것을 저도 직접 μ‹€ν–‰ν•΄λ³΄λ©΄μ„œ μ•Œκ²Œλ˜μ—ˆμ–΄μš”!

λ¨Όμ € λ―Έμ…˜ μš”κ΅¬μ‚¬ν•­μ— 맞게 κ²Œμž„μ„ μ§„ν–‰ν•  수 μžˆλŠ” ν˜•νƒœλ‘œ λ§Œλ“€μ–΄λ³΄μ‹  ν›„, λ‹€μ‹œ 리뷰 μš”μ²­ λΆ€νƒλ“œλ €μš”! πŸ™‚πŸ’ͺ

@moto6

moto6 commented Nov 27, 2023

Copy link
Copy Markdown
Author

μ•ˆλ…•ν•˜μ„Έμš”! ν”Όλ“œλ°± μ£Όμ‹  λΆ€λΆ„ μˆ˜μ •μ™„λ£Œν–ˆκ³  λ²„κ·ΈκΉŒμ§€ μˆ˜μ •μ™„λ£Œ ν•˜μ˜€μŠ΅λ‹ˆλ‹€!!
image

@malibinYun malibinYun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

DM 문의 μ£Όμ‹ λŒ€λ‘œ, λΈ”λž™μž­ 룰에 λŒ€ν•΄ μ™„μ „νžˆ λ°˜μ˜ν•˜κΈ° μœ„ν•΄ request change κ±Έμ–΄λ‘˜κ²Œμš”!
룰에 λŒ€ν•΄ μ™„μ „νžˆ λ°˜μ˜λ˜μ‹ λ‹€λ©΄ λ‹€μ‹œ 리뷰 μš”μ²­ λΆ€νƒλ“œλ €μš”! πŸ’ͺ

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