Skip to content
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

[๐Ÿš€ 3๋‹จ๊ณ„ - ์ง€๋ขฐ ์ฐพ๊ธฐ(๊ฒŒ์ž„ ์‹คํ–‰)] ์‹ ์ข…ํ™” ๋ฏธ์…˜ ์ œ์ถœํ•ฉ๋‹ˆ๋‹ค. #487

Open
wants to merge 17 commits into
base: jjongwa
Choose a base branch
from

Conversation

jjongwa
Copy link

@jjongwa jjongwa commented Dec 22, 2024

์•ˆ๋…•ํ•˜์„ธ์š”~! ์ง€๋ขฐ ์ฐพ๊ธฐ 3๋‹จ๊ณ„ ์ œ์ถœํ•ฉ๋‹ˆ๋‹ค!

๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ง€๋‚œ ๋‹จ๊ณ„์— ๋Œ€ํ•œ ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜ & 3๋‹จ๊ณ„ ์š”๊ตฌ์‚ฌํ•ญ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค!

๊ฒŒ์ž„ํŒ ๋‘˜๋ ˆ๋ฅผ ์ถ”๊ฐ€๋กœ ๋งŒ๋“œ๋Š” ๋ฐฉ์‹๊ณผ ์ขŒํ‘œ๋ฅผ ๋ฏธ๋ฆฌ ์ƒ์„ฑ ํ›„ ์„ž์–ด ์ง€๋ขฐ ์œ„์น˜๋ฅผ ์ •ํ•˜๋Š” ๋ฐฉ์‹์€ ๋ฏธ์ฒ˜ ์ƒ๊ฐํ•˜์ง€ ๋ชปํ–ˆ์—ˆ๋Š”๋ฐ
ํ™•์‹คํžˆ ๋กœ์ง์˜ ๋ณต์žก๋„๊ฐ€ ์ค„์–ด๋“ค์—ˆ๋„ค์š” ๐Ÿš€

๋งˆ์ง€๋ง‰๊นŒ์ง€ ์ž˜ ๋ถ€ํƒ๋“œ๋ ค์š” ๐Ÿ™‡

Copy link
Member

@malibinYun malibinYun left a comment

Choose a reason for hiding this comment

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

3๋‹จ๊ณ„ ๋ฏธ์…˜ ๊ณ ์ƒ ๋งŽ์œผ์…จ์–ด์š”!
์—ฌ๋Ÿฌ ์ƒ๊ฐํ•ด๋ณผ๋งŒํ•œ ๊ณณ์— ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊ฒจ๋‘์—ˆ์–ด์š”.
ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜ ํ›„ ๋‹ค์‹œ ๋ฆฌ๋ทฐ ์š”์ฒญ ๋ถ€ํƒ๋“œ๋ ค์š”!

Comment on lines 13 to 23
private fun createField(): Map<Position, Spot> {
val spots = mutableMapOf<Position, Spot>()
for (x in 0 until fieldInfo.getWidth() + 1) {
for (y in 0 until fieldInfo.getHeight() + 1) {
val position = Position(x, y)
spots[position] =
if (minePositions.contains(position)) {
MineSpot(position)
} else {
SafeSpot(position, getNearByMineCount(minePositions, position))
}
Copy link
Member

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.

ํ•„๋“œ ํฌ๊ธฐ๊ฐ€ ํด์ˆ˜๋ก ๋ถˆํ•„์š”ํ•˜๊ฒ ๋„ค์š”.!
open ์‹œ์ ์— ์ฃผ๋ณ€ ์ง€๋ขฐ ๊ฐœ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•ด ์—…๋ฐ์ดํŠธ ํ•˜๋„๋ก ๋ณ€๊ฒฝํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค! 19f1404

Comment on lines 33 to 42
return NearbyDirection.entries
.toTypedArray()
.count { direction ->
val nearbyPosition =
Position(
position.x + direction.dx(),
position.y + direction.dy(),
)
minePositions.contains(nearbyPosition)
}
Copy link
Member

Choose a reason for hiding this comment

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

Position ๊ฐ์ฒด์—๊ฒŒ ํ•ด๋‹น ๊ฐ์ฒด ์ฃผ๋ณ€์˜ Position์€ ๋ฌด์—‡์ด ์žˆ๋Š”์ง€ ๋ฉ”์‹œ์ง€๋ฅผ ๋˜์ ธ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๊ตฌ์„ฑํ•ด๋ณด๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?

val nearbyPositions = position.nearbyPositions()

Copy link
Author

Choose a reason for hiding this comment

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

data class Position(val x: Int, val y: Int) {
    fun nearbyPositions(): Set<Position> {
        return NearbyDirection.entries.map { direction ->
            Position(
                x + direction.dx(),
                y + direction.dy(),
            )
        }.toSet()
    }
}

Position์ด ํ•ด๋‹น ์ฑ…์ž„์„ ๊ฐ€์ง€๋„๋ก ์ด๋™ํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.
getNearByMineCount์˜ ๊ตฌ์กฐ๊ฐ€ ํ›จ์”ฌ ๊น”๋”ํ•ด์กŒ๋„ค์š”! ๐Ÿ‘

private fun getNearByMineCount(
        minePositions: Set<Position>,
        position: Position,
    ): Int {
        val nearbyPositions = position.nearbyPositions()
        return nearbyPositions.count { it in minePositions }
    }

Comment on lines 58 to 60
fun openSpot(position: Position) {
val targetSpot = spots[position] as SafeSpot
targetSpot.open()
Copy link
Member

Choose a reason for hiding this comment

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

์—ฌ๋Š” ์นธ์˜ ์œ„์น˜๊ฐ€ ์ง€๋ขฐ์ธ ๊ฒฝ์šฐ๋Š” ํƒ€์ž… ์บ์ŠคํŒ… Exception์ด ๋‚˜ํƒ€๋‚  ๊ฒƒ์œผ๋กœ ์šฐ๋ ค๋ผ์š”.
์ง€๋ขฐ์ธ ๊ฒฝ์šฐ์— ๊ฒŒ์ž„์ด ๋น„์ •์ƒ ์ข…๋ฃŒ๋˜์ง€ ์•Š๋„๋ก ์ฒ˜๋ฆฌํ•ด๋ณด๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?

Copy link
Author

@jjongwa jjongwa Dec 24, 2024

Choose a reason for hiding this comment

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

๊ธฐ์กด์—” ์—ฌ๋Š” ์นธ์˜ ์œ„์น˜๊ฐ€ Mine์ธ์ง€ ์—ฌ๋ถ€๋ฅผ Game์—์„œ ๋”ฐ๋กœ ํ™•์ธํ•œ ๋’ค openSpot์„ ํ˜ธ์ถœํ•˜๋Š” ๊ตฌ์กฐ์˜€์ง€๋งŒ,
Mine์ธ์ง€ ์—ฌ๋ถ€๋ฅผ openSpot์— ํฌํ•จ์‹œํ‚ค๋กœ ํ•ด๋‹น ์—ฌ๋ถ€๋ฅผ Boolean๊ฐ’์œผ๋กœ ๋ฐ›์•„ ๊ฒŒ์ž„ ์ข…๋ฃŒ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ตฌ์กฐ๋กœ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค! 49f3806

Comment on lines 6 to 7
fun open() {
require(!isOpened) { "์ด๋ฏธ ์—ด๋ฆฐ ์นธ์ž…๋‹ˆ๋‹ค." }
Copy link
Member

Choose a reason for hiding this comment

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

์ด๋ฏธ ์—ด๋ฆฐ ์นธ์„ ์ž…๋ ฅํ•˜๋Š” ๊ฒฝ์šฐ ๊ฒŒ์ž„์ด ๋น„์ •์ƒ ์ข…๋ฃŒ๋˜๋Š” ๊ฒƒ์€ ์–ด์ƒ‰ํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•ด์š”.
open์„ ํ˜ธ์ถœํ•˜๋Š” ๊ณณ์—์„œ try-catch๋กœ ์žก์•„๋ณผ ์ˆ˜๋„ ์žˆ๊ฒ ์ง€๋งŒ, sealed๋ฅผ ํ™œ์šฉํ•ด์„œ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜ํ™˜ํ•ด๋ณด๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?
openํ–ˆ์„ ๋•Œ, ๋น„์ •์ƒ์ ์ด์ง€๋งŒ ์ถฉ๋ถ„ํžˆ ๊ฒŒ์ž„ ๋„๋ฉ”์ธ์˜ ๋กœ์ง์ธ ๊ฒฝ์šฐ ๊ทธ์— ๋Œ€ํ•œ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•ด์„œ ๋ฐ˜ํ™˜ํ•˜๊ณ , ๋ฐ˜ํ™˜ ๋ฐ›์€ ๊ณณ์—์„œ๋Š” ๊ทธ ๊ฐ์ฒด์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ๋น„๊ตํ•ด์„œ ํ›„ ์ฒ˜๋ฆฌ๋ฅผ ํ•ด๋„ ์ข‹๊ฒ ์–ด์š”.

sealed interface OpenResult {
        object Success: OpenResult
        object AlreadyOpendSpot: OpenResult
}
...

Copy link
Author

Choose a reason for hiding this comment

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

openSpot์—์„œ OpenResult๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๋ณ€๊ฒฝํ•˜๊ณ , ์ด๋ฅผ ํ†ตํ•ด Game์˜ ์ข…๋ฃŒ ์—ฌ๋ถ€๋ฅผ ๊ฒฐ์ •ํ•˜๋„๋ก ๋ณ€๊ฒฝํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค!
AlreadyOpen์˜ ๊ฒฝ์šฐ, ์ด๋ฏธ ์—ด๋ฆฐ ์นธ์ด๋ผ๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์ถœ๋ ฅํ•˜๊ณ  ๊ณ„์† ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋กœ์ง๋„ ๋ณ€๊ฒฝํ•ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

646f2f3

Comment on lines 7 to 44

class FieldResponse(private val field: Field) {
fun toFormattedStringInitialField(): String {
return field.lines.joinToString("\n") { line ->
line.spots.joinToString(" ") { spot ->
if (spot.isMine()) {
"*"
} else {
getNearbyMineCount(spot as SafeSpot)
}.toString()
fun toFormattedStringField(): String {
val fieldInfo = field.getFieldInfo()
val positions = generatePositions(fieldInfo.getWidth(), fieldInfo.getHeight())

return formatField(positions)
}

private fun generatePositions(
width: Int,
height: Int,
): List<Position> {
return (1..width).flatMap { x ->
(1..height).map { y ->
Position(x, y)
}
}
}

private fun getNearbyMineCount(spot: SafeSpot): String {
return spot.nearbyMineCount.toString()
private fun formatField(positions: List<Position>): String {
return positions.groupBy { it.y }
.map { (_, positionsInRow) ->
positionsInRow.joinToString(" ") { position ->
formatSpot(field.getSpot(position))
}
}.joinToString("\n")
}

private fun formatSpot(spot: Spot): String {
if (spot.isOpened()) {
return if (spot is SafeSpot) {
spot.nearbyMineCount.toString()
} else {
"*"
}
}
return "C"
Copy link
Member

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.

๐Ÿ‘
์ €๋Š” ์กฐ๊ธˆ ๋‹ค๋ฅด๊ฒŒ ๋ณด์•˜๋Š”๋ฐ์š”,
VIew๋Š” '์–ด๋””์— ๋ณด์—ฌ์ค„ ๊ฒƒ์ธ๊ฐ€'์ด๊ณ , Response๋Š” '์–ด๋–ป๊ฒŒ ๋ณด์—ฌ์ค„ ๊ฒƒ์ธ๊ฐ€'์˜ ์ฑ…์ž„์„ ๊ฐ๊ฐ ๋งก๊ณ  ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์–ด์š”!

๊ทธ๋ž˜์„œ ํ•ด๋‹น Veiw์— ๋งž๋Š” ์ถœ๋ ฅ ํ˜•์‹์œผ๋กœ์˜ ๋ณ€๊ฒฝ์€ Response์˜ ๋ฉ”์„œ๋“œ๋ฅผ ํ†ตํ•ด ์ฒ˜๋ฆฌํ•˜๊ณ ,
์ด๋ฅผ ํ†ตํ•ด View ๋ ˆ์ด์–ด๊นŒ์ง€ ๋„๋ฉ”์ธ์ด ๋…ธ์ถœ๋˜๋Š” ๊ฒƒ์„ ๋ง‰์•„ ๋„๋ฉ”์ธ์˜ ์บก์Šํ™”๋ฅผ ์œ ์ง€ํ•˜๋Š” ์žฅ์ ๋„ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹ค.!

Comment on lines +61 to +67
/*
1 2 3 4 x
* 1 0 0 1 C 1 0 0
2 2 2 1 -> 2 C 2 2 1
1 * 2 * 3 C C C C
y
*/
Copy link
Member

Choose a reason for hiding this comment

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

ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ๋ถ€์—ฐ ์„ค๋ช…ํ•ด์ฃผ๋Š”, ์‹œ๊ฐ์  ํ‘œํ˜„์„ ๋„์™€์ฃผ๋Š” ์ฃผ์„ ๋„ˆ๋ฌด ์ข‹๋„ค์š”! ๐Ÿ‘๐Ÿ‘

Copy link
Member

@malibinYun malibinYun left a comment

Choose a reason for hiding this comment

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

ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜ ๊ณ ์ƒ ๋งŽ์œผ์…จ์–ด์š” ๐Ÿ‘
์ง€๋ขฐ์ฐพ๊ธฐ ๋ฏธ์…˜์„ ๋„ˆ๋ฌด ์ž˜ ๊ตฌํ˜„ํ•ด์ฃผ์…”์„œ ํฌ๊ฒŒ ๋” ํ”ผ๋“œ๋ฐฑ ๋“œ๋ฆด ๋ถ€๋ถ„์ด ์—†์—ˆ๋„ค์š”!
๋‹ค์Œ ๋ฏธ์…˜์€ ๋ฆฌํŒฉํ„ฐ๋ง ๋ฏธ์…˜์ด๋ผ, ๋” ๊ตฌํ˜„ํ•˜๊ณ  ์‹ถ์œผ์‹  ๋ถ€๋ถ„์ด ์žˆ์œผ์‹œ๋‹ค๋ฉด ๋ฐ˜์˜ ํ›„ ๋ฆฌ๋ทฐ ์š”์ฒญ ๋ถ€ํƒ๋“œ๋ฆฌ๊ณ , ์ด๋งŒ ๋งˆ๋ฌด๋ฆฌ ํ•˜๊ณ  ์‹ถ์œผ์‹œ๋‹ค๋ฉด DM์ด๋‚˜ ์ฝ”๋ฉ˜ํŠธ ๋ถ€ํƒ๋“œ๋ ค์š”!

Comment on lines 9 to 20
val position = Position(1, 1)
val nearbyPositions = position.nearbyPositions()

nearbyPositions.size shouldBe 8
nearbyPositions shouldContain Position(0, 0)
nearbyPositions shouldContain Position(0, 1)
nearbyPositions shouldContain Position(0, 2)
nearbyPositions shouldContain Position(1, 0)
nearbyPositions shouldContain Position(1, 2)
nearbyPositions shouldContain Position(2, 0)
nearbyPositions shouldContain Position(2, 1)
nearbyPositions shouldContain Position(2, 2)
Copy link
Member

Choose a reason for hiding this comment

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

๊ธฐ๋Œ“๊ฐ’์ธ ์ขŒํ‘œ๋ฅผ set์œผ๋กœ ๋‹ด์•„, set๋Œ€ set์œผ๋กœ ๊ฐ’์„ ๋น„๊ตํ•ด ํ…Œ์ŠคํŠธ๋ฅผ ํ•ด๋ณด์•„๋„ ์ข‹๊ฒ ์–ด์š”!

Copy link
Author

Choose a reason for hiding this comment

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

set๊ณผ set ๋น„๊ต๋„ ๊ฐ„๋‹จํ•˜๊ฒŒ shouldBe๋กœ ๊ฐ€๋Šฅํ•˜๊ตฐ์š”..! ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค!
b9f4f1b

Comment on lines 51 to 52
}
openTargetSpot(it as SafeSpot)
Copy link
Member

Choose a reason for hiding this comment

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

as? ๋กœ nullable ์บ์ŠคํŒ…์„ ํ•œ ๋’ค, null ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๋Š” ํ˜•ํƒœ๋กœ ๋กœ์ง์„ ๊ตฌ์„ฑํ•ด๋ด๋„ ์ข‹๊ฒ ์–ด์š”!

Copy link
Author

Choose a reason for hiding this comment

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

fun openSpot(position: Position): OpenResult {
        val targetSpot =
            spots[position]?.let {
                if (it.isMine()) {
                    return OpenResult.GameOver
                }
                it
            } as SafeSpot
        val openResult = targetSpot.open()
        targetSpot.calculateNearbyMineCount(minePositions)
        checkAndOpenNearbySpot(targetSpot)
        return openResult
    }

์ด๋Ÿฐ ์‹์œผ๋กœ let์„ ํ†ตํ•ด null์ด ์•„๋‹Œ spot์—์„œ๋งŒ ๋‚˜๋จธ์ง€ ๋กœ์ง์„ ์‹คํ–‰ํ•˜๋„๋ก ๋ฐ”๊พธ์–ด ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค

Comment on lines 30 to 31
var nearbyMineCount: Int = 0

Copy link
Member

Choose a reason for hiding this comment

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

์™ธ๋ถ€์—์„œ๋Š” ์ด ํ•„๋“œ๋ฅผ ์žฌํ• ๋‹น ํ•˜์ง€ ๋ชปํ•˜๋„๋ก, setter๋ฅผ private์œผ๋กœ ๋ง‰์•„๋ณด๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?
์ฝ”ํ‹€๋ฆฐ ํ”„๋กœํผํ‹ฐ์— ๋Œ€ํ•œ ๋ฌธ๋ฒ•์€ ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•ด๋ณด์„ธ์š”!

Copy link
Author

Choose a reason for hiding this comment

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

nearbyMineCount์— private set ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค! d9995d5

Comment on lines 26 to 27
fun getFieldInfo(): FieldInfo {
return fieldInfo
Copy link
Member

Choose a reason for hiding this comment

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

์ด ํ•จ์ˆ˜๋Š” fieldInfo ๋ฉค๋ฒ„์˜ private์„ ์ง€์›Œ ์™ธ๋ถ€์— ํ”„๋กœํผํ‹ฐ๋ฅผ ๊ณต๊ฐœํ•˜๋Š” ํ˜•ํƒœ๋กœ ์ œ๊ฑฐํ•ด๋ณผ ์ˆ˜ ์žˆ๊ฒ ์–ด์š”!

Copy link
Author

Choose a reason for hiding this comment

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

๋ถˆํ•„์š”ํ•œ getter๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ํ•„๋“œ์˜ private์„ ์ œ๊ฑฐํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค! d7db7a3

Comment on lines 63 to 64
if (!spot.isOpened()) {
openSpot(it)
Copy link
Member

Choose a reason for hiding this comment

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

spot ๊ฐ์ฒด์— isNotOpened() ํ˜น์€ isClosed() ํ•จ์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•ด์ค˜๋„ ์ข‹๊ฒ ๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“œ๋„ค์š”!

Copy link
Author

Choose a reason for hiding this comment

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

ํ™•์‹คํžˆ ๋ถ€์ •๋ฌธ์„ ์“ฐ๋Š” ๊ฒƒ๋ณด๋‹จ isClosed๋ฅผ ๋งŒ๋“ค์–ด ์‚ฌ์šฉํ•˜๋Š” ํŽธ์ด ํ›จ์”ฌ ๋” ๊ฐ€๋…์„ฑ์ด ์ข‹์•„ ๋ณด์ด๋„ค์š”! 2bb8cf2

@jjongwa
Copy link
Author

jjongwa commented Dec 25, 2024

@malibinYun ์ด์™• ํ•˜๋Š” ๋ฏธ์…˜ ์ตœ๋Œ€ํ•œ ๊น”๋”ํ•˜๊ฒŒ ๋๋‚ด๊ณ  ์‹ถ์–ด ๋‚จ๊ฒจ์ฃผ์‹  ๋ฆฌ๋ทฐ์— ๋Œ€ํ•œ ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค!
ํ˜น์‹œ ์ถ”๊ฐ€๋กœ ๊ตฌ์กฐ์ ์ธ ๋ฆฌํŒฉํ† ๋ง ์•„์ด๋””์–ด๊ฐ€ ์žˆ๋‹ค๋ฉด ๋ญ๋“ ์ง€ ๋ฆฌ๋ทฐ ์ฃผ์„ธ์š”! ๐Ÿ™‡ ๐Ÿ™‡ ๐Ÿ™‡

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