added moving pawn when player miss a turn

This commit is contained in:
Wenszel
2023-11-11 18:48:35 +01:00
parent 6114d370e9
commit d0b12137b5
7 changed files with 162 additions and 105 deletions
+1 -4
View File
@@ -78,7 +78,7 @@ const Map = ({ pawns, nowMoving, rolledNumber }) => {
y = event.clientY - rect.top;
for (const pawn of pawns) {
if (ctx.isPointInPath(pawn.circle, x, y)) {
socket.emit('game:move', { pawnId: pawn._id });
socket.emit('game:move', pawn._id);
}
}
setHintPawn(null);
@@ -212,9 +212,6 @@ const Map = ({ pawns, nowMoving, rolledNumber }) => {
socket.on('game:move', () => {
setHintPawn(null);
});
socket.on('game:skip', () => {
setHintPawn(null);
});
socket.on('game:roll', () => {
setHintPawn(null);
});