diff --git a/public/sounds/move.mp3 b/public/sounds/move.mp3 new file mode 100644 index 0000000..ed2443d Binary files /dev/null and b/public/sounds/move.mp3 differ diff --git a/src/components/ChessBoard/ChessBoard.tsx b/src/components/ChessBoard/ChessBoard.tsx index 54a3d55..4be79ba 100644 --- a/src/components/ChessBoard/ChessBoard.tsx +++ b/src/components/ChessBoard/ChessBoard.tsx @@ -108,6 +108,8 @@ const ChessBoard = ({ fen, onChange: setFen, disabled }: ChessBoardProps) => { ], }); + playSound("MOVE"); + if (setFen) setFen(fenAfterMove); setCurrentCell({ row: newRow, col: newCol }); diff --git a/src/contexts/Sound/index.tsx b/src/contexts/Sound/index.tsx index 2e4a678..c3e2e23 100644 --- a/src/contexts/Sound/index.tsx +++ b/src/contexts/Sound/index.tsx @@ -5,6 +5,7 @@ const sounds = { CELL_CLICK: "click.mp3", RANDOM_FEN: "random.mp3", SWITCH: "switch.mp3", + MOVE: "move.mp3", }; export type SoundContextType = {