Skip to content

Commit

Permalink
Update Game.js
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam authored Jan 28, 2025
1 parent f6365cf commit 491fc90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ws/classes/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ export default class Game {
}

if(p1obj && leftUser !== 'p1') {
try {
p1obj.send({
type: 'duelEnd',
winner: winner?.tag === 'p1',
Expand All @@ -633,9 +634,11 @@ export default class Game {
timeElapsed: this.endTime - this.startTime,
oldElo: p1OldElo
});
} catch(e){}
}

if(p2obj && leftUser !== 'p2') {
try {
p2obj.send({
type: 'duelEnd',
winner: winner?.tag === 'p2',
Expand All @@ -644,6 +647,8 @@ export default class Game {
timeElapsed: this.endTime - this.startTime,
oldElo: p2OldElo
});
} catch(e) {
}
}

}
Expand All @@ -662,4 +667,4 @@ export default class Game {
}
}

}
}

0 comments on commit 491fc90

Please sign in to comment.