빌드 오류 수정

This commit is contained in:
Ayuriel 2025-05-31 23:44:23 +09:00
parent ba7850d241
commit 3d35b51a1d
2 changed files with 2 additions and 3 deletions

View File

@ -41,7 +41,7 @@ export default function ChessGame({ gameMode = GameMode.CLASSIC }: ChessGameProp
} else {
setValidMoves([])
}
}, [selectedPiece, board, currentPlayer])
}, [selectedPiece, board, currentPlayer, gameMode])
// Check for game end conditions after each move
useEffect(() => {
@ -92,7 +92,6 @@ export default function ChessGame({ gameMode = GameMode.CLASSIC }: ChessGameProp
// Update captured pieces if a piece was captured
if (result.capturedPiece) {
setCapturedPieces((prev) => {
const oppositeColor = currentPlayer === PieceColor.WHITE ? PieceColor.BLACK : PieceColor.WHITE
return {
...prev,
[currentPlayer]: [...prev[currentPlayer], result.capturedPiece],

View File

@ -28,7 +28,7 @@ export default function GameInfo({ currentPlayer, gameStatus, moveHistory, captu
<div
className={`w-4 h-4 rounded-full ${currentPlayer === PieceColor.WHITE ? "bg-white border border-gray-300" : "bg-black"}`}
></div>
<span className="font-medium">{currentPlayer === PieceColor.WHITE ? "White" : "Black"}'s turn</span>
<span className="font-medium">{currentPlayer === PieceColor.WHITE ? "White" : "Black"}&apos;s turn</span>
</div>
{gameStatus === "ongoing" ? (