Open moblizeit opened 3 years ago
You could just check to see if the previous position is not equal to the current position. If so, add a sound effect and adjust the timing of it with setTimeout. You can use lodash's isEqual() to check if the two position objects are the same
sorry my question was actually how to add sound effects rather how to detect where to add it.
is there a way to add sound when pieces are moved on the board?