feat : add sounds

This commit is contained in:
GuillaumeSD
2024-03-20 04:57:37 +01:00
parent 32fc196e74
commit 9e497cb24b
15 changed files with 74 additions and 26 deletions

View File

@@ -40,17 +40,13 @@ export default function Board() {
target: Square,
piece: string
): boolean => {
try {
const result = makeBoardMove({
from: source,
to: target,
promotion: piece[1]?.toLowerCase() ?? "q",
});
const result = makeBoardMove({
from: source,
to: target,
promotion: piece[1]?.toLowerCase() ?? "q",
});
return !!result;
} catch {
return false;
}
return !!result;
};
const handleSquareLeftClick = () => {