WIP
This commit is contained in:
@@ -103,15 +103,15 @@ class Player {
|
|||||||
const position = this.getPosition();
|
const position = this.getPosition();
|
||||||
|
|
||||||
if (this.ply > 0) {
|
if (this.ply > 0) {
|
||||||
if (/[ce]/.test(position.move?.flags as string)) {
|
if (position.mate) {
|
||||||
|
sfx.snap.play();
|
||||||
|
sfx.move.play();
|
||||||
|
} else if (/[ce]/.test(position.move?.flags as string)) {
|
||||||
sfx.take.play();
|
sfx.take.play();
|
||||||
sfx.move.play();
|
sfx.move.play();
|
||||||
} else if (/[kqp]/.test(position.move?.flags as string)) {
|
} else if (/[kqp]/.test(position.move?.flags as string)) {
|
||||||
sfx.swap.play();
|
sfx.swap.play();
|
||||||
sfx.move.play();
|
sfx.move.play();
|
||||||
} else if (position.mate) {
|
|
||||||
sfx.snap.play();
|
|
||||||
sfx.move.play();
|
|
||||||
} else {
|
} else {
|
||||||
sfx.move.play();
|
sfx.move.play();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user