diff --git a/src/chessboard/overlayCreation.ts b/src/chessboard/overlayCreation.ts index 795f131..fe75179 100644 --- a/src/chessboard/overlayCreation.ts +++ b/src/chessboard/overlayCreation.ts @@ -1,7 +1,7 @@ import { PieceColor, PieceName, PieceType } from './types'; const pieceTypeToChineseChar: Record = { - 'red_king': '帥', 'red_guard': '仕', 'red_bishop': '相', 'red_knight': '馬', 'red_rook': '車', 'red_cannon': '炮', 'red_pawn': '兵', + 'red_king': '帥', 'red_guard': '仕', 'red_bishop': '相', 'red_knight': '傌', 'red_rook': '俥', 'red_cannon': '炮', 'red_pawn': '兵', 'black_king': '将', 'black_guard': '士', 'black_bishop': '象', 'black_knight': '馬', 'black_rook': '車', 'black_cannon': '炮', 'black_pawn': '卒', }; diff --git a/src/components/ChessboardDisplay.tsx b/src/components/ChessboardDisplay.tsx index 329e607..2a7ec8b 100644 --- a/src/components/ChessboardDisplay.tsx +++ b/src/components/ChessboardDisplay.tsx @@ -13,7 +13,7 @@ const pieceMap: { [key: string]: string } = { A: '仕', B: '相', N: '傌', - R: '車', + R: '俥', C: '炮', P: '兵', }; diff --git a/src/components/SolutionDisplay.tsx b/src/components/SolutionDisplay.tsx index 89a085e..6c11ab3 100644 --- a/src/components/SolutionDisplay.tsx +++ b/src/components/SolutionDisplay.tsx @@ -28,13 +28,7 @@ export function SolutionDisplay({ // Create move history items const moveItems = moveHistory.map((move, index) => { const fenBeforeMove = fenHistory[index]; // FEN before the move - let notation = ''; - try { - notation = moveToChineseNotation(fenBeforeMove, move); - } catch (err) { - notation = 'Error'; - console.error(`Error converting move to notation: ${err}`); - } + const notation = moveToChineseNotation(fenBeforeMove, move); return ( {notation}