Skip to content

[๐Ÿš€ ์‚ฌ์ดํด2 - ๋ฏธ์…˜ (๊ธฐ๋ฌผ ํ™•์žฅ + DB ์ ์šฉ)] ์ด์•ˆ ๋ฏธ์…˜ ์ œ์ถœํ•ฉ๋‹ˆ๋‹ค.#350

Merged
sihyung92 merged 27 commits intowoowacourse:eian1106from
Eian1106:step2
Apr 13, 2026

Conversation

@Eian1106
Copy link
Copy Markdown

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

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

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

์•ˆ๋…•ํ•˜์„ธ์š” ์›จ์ง€๐Ÿ˜†
์‚ฌ์ดํด2๋Š” JDBC๋ฅผ ์ ์šฉํ–ˆ์–ด์•ผ ํ–ˆ๋Š”๋ฐ์š”, ์ €๋Š” DB๋ฅผ ์‚ฌ์šฉํ•ด๋ณธ ์ ์ด ์—†๊ธฐ์— ์šฐ์„  ๋น ๋ฅธ ๊ตฌํ˜„์„ ๋ชฉํ‘œ๋กœ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
ํฌ๋ฃจ๋“ค ์‚ฌ์ด์—์„  Connection Pool, Transaction ๋“ฑ ๋งŽ์€ ์ด์•ผ๊ธฐ๊ฐ€ ์˜ค๊ฐ€๋Š”๋ฐ์š”
ํ•ด๋‹น ๋‚ด์šฉ๋“ค์„ ์ƒ๊ฐํ•˜๊ณ  ์ ์šฉํ•˜๊ธฐ์—” ์‚ฌ์ดํด2์˜ ๊ธฐ๊ฐ„๋„ ์–ผ๋งˆ ๋‚จ์ง€ ์•Š์•„ ์šฐ์„  ๋Œ์•„๊ฐ€๋Š” ์ฝ”๋“œ ๋ฆฌ๋ทฐ์š”์ฒญ์„ ๋“œ๋ฆฝ๋‹ˆ๋‹ค!..
์šฐํ…Œ์ฝ” ๊ตฌํ˜„ ์›์น™ ๋™์ž‘ํ•˜๋Š” ์ฝ”๋“œ๊ฐ€ ๋˜๋ฉด ๋ฐ”๋กœ PR์„ ๋ณด๋‚ธ๋‹ค ... ๐Ÿ˜…
์ž˜ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค ๐Ÿ™‡โ€โ™‚๏ธ

Palace์™€ Position

Palace๋Š” ์œ„์น˜์— Position๊ณผ ๊ด€๋ จ๋˜์–ด ๊ถ์„ฑ์˜ ์œ„์น˜์ธ์ง€, ๊ถ์„ฑ ์ •์ค‘์•™(์™• ์œ„์น˜)์ธ์ง€ ํ™•์ธํ•ด์ฃผ๋Š” ํด๋ž˜์Šค ์ž…๋‹ˆ๋‹ค.
๊ทธ๋Ÿฐ๋ฐ ํ•ด๋‹น ๋ฉ”์„œ๋“œ๋“ค์„ Position์— ์œ„์น˜ํ•ด๋„ ๋˜์ง€์•Š๋‚˜? ๋ผ๋Š” ์ƒ๊ฐ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
Position์—์„œ ํ•ด๋‹น ๋ฉ”์„œ๋“œ๋“ค์„ ์ œ๊ณตํ•œ๋‹ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

position.isPalacePosition()
position.isGeneralPosition()

๊ทธ๋Ÿฌ๋‚˜ Palace์˜ ๋‚ด์šฉ์„ Position์— ์œ„์น˜ํ•œ๋‹ค๋ฉด, Position์ด ํ•˜๋Š” ์ฑ…์ž„์ด ๋„ˆ๋ฌด ๋งŽ์•„์ง€๊ธฐ์— ์˜คํžˆ๋ ค ๋ถ„๋ฆฌํ•˜๋Š” ๊ฒŒ ๊ถ์„ฑ ์˜์—ญ์— ๋Œ€ํ•œ ๊ด€๋ฆฌ๊ฐ€ ์‰ฝ๋‹ค๋Š” ์˜๊ฒฌ๋„ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
๋”ฐ๋ผ์„œ ์›จ์ง€์˜ ์˜๊ฒฌ์ด ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค!

DB

JDBC๋ฅผ ์ฒ˜์Œ ์‚ฌ์šฉํ•˜๋‹ค๋ณด๋‹ˆ, ๊ธฐ์ดˆ์ ์ธ CRUD๋งŒ ํ•™์Šตํ•ด๋ณด๊ณ , ๋”ฐ๋ผํ•ด๋ณด์•˜๋Š”๋ฐ์š”
๋‹ค์Œ ๋‹จ๊ณ„๋กœ ๋‚˜์•„๊ฐˆ ๋ฐฉํ–ฅ์„ ๋“ฃ๊ณ ์‹ถ์Šต๋‹ˆ๋‹ค.
์›จ์ง€์˜ ๋ฆฌ๋ทฐ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ๋Š”๋™์•ˆ

  • ์ปค๋„ฅ์…˜ ํ’€
  • ํŠธ๋žœ์žญ์…˜

์— ๋Œ€ํ•ด์„œ ํ•™์Šตํ•˜๊ณ  ์žˆ๊ฒ ์Šต๋‹ˆ๋‹ค!
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ๐Ÿ™‡โ€โ™‚๏ธ

Eian1106 added 15 commits April 7, 2026 14:35
์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜ ๋ฏธ์‚ฌ์šฉ์œผ๋กœ ๋ณ€๊ฒฝ
Copy link
Copy Markdown

@sihyung92 sihyung92 left a comment

Choose a reason for hiding this comment

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

์•ˆ๋…•ํ•˜์„ธ์š” ์ด์•ˆ, ๋ฆฌ๋ทฐ์–ด ์›จ์ง€์ž…๋‹ˆ๋‹ค.

JDBC๊ฐ€ ์ฒ˜์Œ์ด์‹œ๋ผ๋ฉด ์ƒˆ๋กœ์šด ๊ฐœ๋…์ด ๋ฌผ๋ฐ€๋“ฏ์ด ๋“ค์–ด์˜ค์‹คํ…๋ฐ, ํ•™์Šตํ•ด๋ณด๊ณ  ์ ์šฉํ•ด๋ณด์‹œ๊ณ  ์‹ถ์œผ์‹  ๊ฒŒ ์ƒ๊ธฐ์…จ๋‹ค๋ฉด ๋ฐ˜์˜ํ•ด์ฃผ์…”์š”

Palace์™€ Position

์ง€๊ธˆ์€ ์–ด๋””์— ์žˆ๋“  ํฐ ์ฐจ์ด๋Š” ์—†๋‹ค๊ณ  ์ƒ๊ฐํ•ด์š”. board / piece / position 3๊ฐœ์˜ ํŒจํ‚ค์ง€๊ฐ€ ์„œ๋กœ๋ฅผ ์•Œ๊ณ  ์žˆ๋Š” ์ƒํƒœ์—ฌ์„œ์š”. ์ผ๋‹จ ํ˜„ํ–‰๋Œ€๋กœ ํ•ด๋ณด์‹œ์ฃ  ^.^

๋˜ ์ง„ํ–‰ํ•˜์‹œ๊ณ  ์š”์ฒญ์ฃผ์…”์š”. ํ™”์ดํŒ…์ž…๋‹ˆ๋‹ค~

return Camp.CHO;
}

return Camp.NONE;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

์—ด๊ฑฐํ˜•(enum)์—์„  ๊ฐ€๊ธ‰์ ์ด๋ฉด "NONE" ๊ฐ™์€, ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ผ€์ด์Šค์— ๋Œ€ํ•ด ์ •์˜ํ•˜์ง€ ์•Š๋Š”๊ฒŒ ๋งž์Šต๋‹ˆ๋‹ค.

(ํ˜„์—…์—์„  API ๋ฒ„์ €๋‹ ์ด์Šˆ ๋“ฑ์œผ๋กœ API ํŒŒ๋ผ๋ฏธํ„ฐ์—์„œ enum์—์„œ ์ •์˜ํ•˜์ง€ ์•Š์€ ๋ช…์นญ์ด ๋„˜์–ด์™”์„ ๋•Œ 500์ด ๋ฐœ์ƒํ•˜๋Š” ๊ฑธ ๋ง‰๊ธฐ ์œ„ํ•ด UNKNOWN ๊ฐ™์€ ๊ฑธ ์„ ์–ธํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๊ธด ํ•œ๋ฐ์š”.)

๋งค๋ฒˆ Camp์— ๋Œ€ํ•œ ๋กœ์ง์ด ํ•„์š”ํ•  ๋•Œ ๋งˆ๋‹ค NONE์— ๋Œ€ํ•œ ๋ถ„๊ธฐ์ฒ˜๋ฆฌ๋ฅผ ํ•ด์ค˜์•ผํ•ฉ๋‹ˆ๋‹ค.
์‹ค์€ ์ค‘๋ฆฝ ์ง„์˜์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋ฐ "์ค‘๋ฆฝ"์— ๋Œ€ํ•œ ์ฒ˜๋ฆฌ๋ฅผ ์š”๊ตฌ๋ฐ›์€ ๊ฐœ๋ฐœ์ž๋Š” ๋‚œ๊ฐํ•˜๊ธฐ๋„ ํ• ํ…Œ๊ณ ์š”. (๋ชจ๋“  NONE ์ผ€์ด์Šค๋ฅผ ํ›‘์–ด๋ด์•ผํ•จ)

Optional๋ฅผ ๋ฆฌํ„ดํƒ€์ž…์œผ๋กœ ํ•ด๋ณด์‹œ๋ฉด ์–ด๋–จ๊นŒ์š”?

ELEPHANT(3),
SOLDIER(2),
CHARIOT(13),
NONE(0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

์ด๊ฑฐ ์ง์ „์— Camp.NONE์— ๋Œ€ํ•œ ๋ฆฌ๋ทฐ๋ฅผ ํ•œ ํ›„ ๋น„์Šทํ•œ ๋ฆฌ๋ทฐ๋ฅผ ์œ„ํ•ด ๋ณด๋‹ค๋ณด๋‹ˆ, ์•„์˜ˆ ์“ฐ์ด์ง€ ์•Š๋Š” ์ฝ”๋“œ๋„ค์š”. ์ œ๊ฑฐํ•ด์ฃผ์…”์š”.

Comment on lines 92 to 97
private Camp turnCamp(Camp camp) {
if (camp.equals(Camp.CHO)) {
return Camp.HAN;
}
return Camp.CHO;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cho ๋‹ค์Œ์€ han, han ๋‹ค์Œ์€ cho ๋ผ๋Š” ์ „ํ™˜ ๊ทœ์น™์€ ๋„๋ฉ”์ธ ๊ทœ์น™์ด๋ผ๊ณ  ์ƒ๊ฐ๋˜๋„ค์š”. Camp ๋ฉ”์„œ๋“œ๋กœ ์˜ฎ๊ฒจ์ฃผ์‹œ๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”


import java.util.List;

public class SingleStepPiece extends Piece {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Horse, Elephant๋„ ๊ฑฐ์˜ ๊ฐ™์€ ๋กœ์ง์„ ๊ณต์œ ํ•˜๋Š”๋ฐ์š”.

๊ฑด๋„ˆ ๋›ธ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฌผ๋“ค์˜ ๊ณตํ†ต ๋ถ€๋ชจ๋ฅผ ์ •์˜ํ•ด์ฃผ์–ด๋„ ์ข‹๊ฒ ์–ด์š”.

SingleStepPiece ๊ฐ์ฒด๋„ ๊ทธ๋ ‡๊ณ , Horse/Elephant์˜ ๊ณตํ†ต ๋ถ€๋ชจ๋„ ๊ทธ๋ ‡๊ณ  ๋ฐ”๋กœ ์ƒ์„ฑํ• ์ˆ˜๋Š” ์—†๋„๋ก abstract class๋กœ ์ •์˜ํ•˜๋Š” ๊ฒŒ ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

java 17๋ถ€ํ„ฐ๋Š” sealed class ๋กœ ์„ ์–ธํ•˜๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ์œผ๋‚˜, ํ˜„์—… ์ฝ”๋“œ์—์„  java 17 ์ดํ•˜ ๋ฒ„์ „์ธ ๊ฒฝ์šฐ๋„ ์žˆ์–ด ํ™œ๋ฐœํžˆ ์“ฐ์ด๋Š” ๋ฌธ๋ฒ•์€ ์•„๋‹™๋‹ˆ๋‹ค.

Copy link
Copy Markdown
Author

@Eian1106 Eian1106 Apr 13, 2026

Choose a reason for hiding this comment

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

Horse/Elephant ์˜ ๊ณตํ†ต๋ถ€๋ชจ์ธ MultiStepPiece๋ฅผ ๋งŒ๋“ค์–ด ๊ณตํ†ต ๋กœ์ง์„ ๊ฐœ์„ ํ•˜์˜€์Šต๋‹ˆ๋‹ค!

๊ฑด๋„ˆ ๋›ธ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฌผ๋“ค์˜ ๊ณตํ†ต ๋ถ€๋ชจ

๊ฑด๋„ˆ ๋›ธ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฌผ๋“ค ์ด๋ผ๋Š” ๊ฒƒ์€ Cannon์ด ๊ฑด๋„ˆ ๋›ธ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฌผ๋“ค. ์ฆ‰ Cannon์„ ์ œ์™ธํ•œ ๋ชจ๋“  ๊ฒƒ ์ธ๊ฐ€์š”?
Cannon์„ ์ œ์™ธํ•œ ๊ธฐ๋ฌผ๋“ค์€ ๋‹ค๋ฅธ ๋ง์„ ๊ฑด๋„ˆ ๋›ธ ์ˆ˜ ์—†๊ธฐ์—, ๋ง์”€ํ•ด์ฃผ์‹  '๊ฑด๋„ˆ ๋›ธ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฌผ'์ด๋ผ๋Š” ํ‘œํ˜„์ด ์ด๋™ ๊ฒฝ๋กœ ์ค‘๊ฐ„์— ์žฅ์• ๋ฌผ์ด ์—†๋Š”์ง€ ๊ฒ€์‚ฌํ•ด์•ผ ํ•˜๋Š” ๋งˆ(Horse)์™€ ์ƒ(Elephant)์„ ์ง€์นญํ•˜์‹  ๊ฒƒ์œผ๋กœ ์ดํ•ดํ•˜์—ฌ ๋ฐ˜์˜ํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค!

Chariot๋„ ๊ฑด๋„ˆ ๋Œ ์ˆ˜๊ฐ€ ์—†์œผ๋ฉฐ

Chariot๊ณผ Cannon๋„ ๊ณตํ†ต๋˜๋Š” ๋ถ€๋ถ„(linear)
์ด ๋งŽ์ง€๋งŒ ์‚ฌ์ดํด2์˜ ์‹œ๊ฐ„๊ด€๊ณ„์ƒ ๋ฐฉํ•™ ์ค‘ ๊ฐœ์„ ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ๐Ÿ˜ญ

}
}

//๊ถ์„ฑ ๋กœ์ง
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

์•„๋ž˜ ์ฝ”๋“œ์˜ ๋‚ด์šฉ๊ณผ ๋™์ผํ•œ ์„ค๋ช…์ด๋‹ˆ ์ œ๊ฑฐํ•ด์ฃผ์…”์š”

Comment on lines +54 to +68
Position current = from;
boolean PassGeneralPosition = false;
while (current.canMove(direction)) {
current = current.move(direction);
if(Palace.isGeneralPosition(current)) {
PassGeneralPosition = true;
}
if (current.equals(to) && PassGeneralPosition) {
return true;
}

if (boardReader.isExist(current)) {
break;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

from์˜ ๊ถ์„ฑ์˜ ์ค‘์‹ฌ, ์ฆ‰ (4,8) ๋“ฑ์ธ ๊ฒฝ์šฐ ๋ฒ„๊ทธ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

(4,8) -> (5,9) ์‹œ๋‚˜๋ฆฌ์˜ค๋ฅผ ๊ฒ€ํ† ํ•ด๋ณด์„ธ์š”.

์ด๋ ‡๊ฒŒ ๋ฒ„๊ทธ๋กœ ์ œ๋ณด๋œ ๊ฒฝ์šฐ๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ํ†ตํ•ด ๋ฐฉ์–ดํ•ด๋‘๋Š” ์Šต๊ด€์„ ๋“ค์ด๋Š”๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค. (์™œ ๊ธฐ์กด์— ํ…Œ์ŠคํŠธ๋กœ ํ•ด๋‹น ๋ฒ„๊ทธ๋ฅผ ์žก์„ ์ˆ˜ ์—†์—ˆ๋Š”๊ฐ€๋ฅผ ๊ณ ๋ฏผํ•ด๋ณด๋Š” ์Šต๊ด€)

BoardReader boardReader,
Direction direction) {
Position current = from;
boolean PassGeneralPosition = false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

๋ณ€์ˆ˜๋ช…์ด PascalCase๋กœ ์„ ์–ธ๋˜์–ด ์žˆ๋„ค์š”

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

๊ทธ๋ฆฌ๊ณ  ์ด๊ฑธ ๋‹ค์„ฏ๋ฒˆ์งธ ์ธ์ž๋กœ ๋ฐ›์•„์ฃผ๋ฉด, ๋™์ผํ•œ ๋กœ์ง์„ ์žฌ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒ ์ฃ .

  private boolean canReachTarget(..., Direction direction) {
      return slideToTarget(from, to, boardReader, direction, true);
  }

  private boolean canReachTargetViaGeneral(..., Direction direction) {
      return slideToTarget(from, to, boardReader, direction, Palace.isGeneralPosition(from));
  }

  private boolean slideToTarget(Position from, Position to,
                                 BoardReader boardReader, Direction direction,
                                 boolean reachable) {

      Position current = from;
      while (current.canMove(direction)) {
          current = current.move(direction);
          if (Palace.isGeneralPosition(current)) {
              reachable = true;
          }
...

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.

์ธ์ž๊ฐ€ ๋งŽ์ด์ง€๋Š” ๊ฒƒ์— ๊ฒฝ๊ณ„๋ฅผ ํ•ด์•ผํ• ๊นŒ์š”?
์‹ค๋ฌด์—์„œ๋Š” ์ธ์ž๋ฅผ ์–ด๋А์ •๋„๊นŒ์ง€ ์‚ฌ์šฉํ•ด๋„ ๋˜๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค!

@@ -1,13 +1,15 @@
package domain;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

domain root์— ๋‚จ๊ฒจ์ง„ class ๋“ค์ด ๋งŽ์€๋ฐ์š”.
๊ธฐ์กด ํŒจํ‚ค์ง€์— ํฌํ•จ์‹œํ‚ค๊ฑฐ๋‚˜, ์ƒˆ๋กœ์šด ํŒจํ‚ค์ง€๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์—†์„๊นŒ์š”?

domain root๊ฐ€ '์ง‘ ๋ชป ์ฐพ์€ ๋ฏธ์•„ ๋ชจ์Œ์ง‘' ์ด ๋˜์–ด๊ฐ€๊ณ  ์žˆ๋„ค์š”.


private final InputView inputView;
private final OutputView outputView;
private final JanggiRepository janggiRepository;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

MVC๋Š” Model(๋ฐ์ดํ„ฐ ๊ณ„์ธต)๊ณผ View์˜ ๊ต์ง‘ํ•ฉ ์—ญํ• ์„ ํ•˜์ฃ .
๊ทธ๋Ÿฌ๋‚˜ domain๊นŒ์ง€ ๋„์ถœ๋˜์–ด์žˆ๋Š” ์ƒํ™ฉ์—์„œ DB ์ง์ ‘ ์ ‘๊ทผ์€ controller์˜ ์ฝ”๋“œ๋ฅผ ๋ณต์žกํ•˜๊ฒŒ ๋งŒ๋“ค์–ด์š”.

service ๊ณ„์ธต๊ณผ ํด๋ž˜์Šค๋ฅผ ํ•˜๋‚˜ ๋งŒ๋“ค์–ด "key๋ฅผ ๋ฐ›์•„ DB์— ์ ‘๊ทผํ•ด Board๋ฅผ ๋งŒ๋“ค์–ด์„œ ์‘๋‹ตํ•˜๋Š” ์ ˆ์ฐจ ๋ฉ”์„œ๋“œ", "Board ๊ฐ์ฒด๋ฅผ DB์— ์ €์žฅํ•˜๋Š” ์ ˆ์ฐจ ๋ฉ”์„œ๋“œ"๋ฅผ ๋งŒ๋“ค๊ณ  controller์—์„  ์ข€๋” ๊ฐ€๋ณ๊ฒŒ ์งˆ์˜ํ•˜๋Š” ํŒจํ„ด์„ ๊ตฌํ˜„ํ•ด๋ณด๋ฉด ์–ด๋–จ๊นŒ์š”?

private static final String PASSWORD = "";

public void saveGame(Map<Position, Piece> boardStatus, Camp camp) {
initTable();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ํ…Œ์ด๋ธ” ์ดˆ๊ธฐํ™”๋Š” ๋งค๋ฒˆ ํ•˜๋Š” ์ž‘์—…์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์— Repository ์—์„œ ๊ตฌํ˜„ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์•„์š”. ๋•Œ์— ๋”ฐ๋ผ ๋งค์šฐ ์œ„ํ—˜ํ•œ ์ฝ”๋“œ๊ฐ€ ๋  ์ˆ˜ ์žˆ์–ด์„œ์š”.

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

Copy link
Copy Markdown

@sihyung92 sihyung92 left a comment

Choose a reason for hiding this comment

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

์•ˆ๋…•ํ•˜์„ธ์š” ์ด์•ˆ, ๋ฆฌ๋ทฐ์–ด ์›จ์ง€์ž…๋‹ˆ๋‹ค.
DM์—์„œ ๋ง์”€๋“œ๋ฆฐ ๋Œ€๋กœ ์šฐ์„  ๋จธ์ง€ ํ›„ ์ตœ์ข… ๋ฆฌ๋ทฐ๋ฅผ ๋“œ๋ฆด๊ฒŒ์š”.
์–ด๋ ค์šด ์žฅ๊ธฐ ๋ฏธ์…˜ ์ˆ˜ํ–‰ํ•˜์‹œ๋А๋ผ ์ˆ˜๊ณ  ๋งŽ์œผ์…จ์–ด์š”. ์•ž์œผ๋กœ์˜ ๋ ˆ๋ฒจ๋“ค๋„ ํ™”์ดํŒ…์ž…๋‹ˆ๋‹ค

@sihyung92 sihyung92 merged commit 58df04b into woowacourse:eian1106 Apr 13, 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