Skip to content

Commit

Permalink
Fix #815
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererXII committed Mar 20, 2024
1 parent 7310734 commit e07737f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ui/round/src/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ export function make(send: SocketSend, ctrl: RoundController): RoundSocket {
ctrl.redraw();
},
pauseOffer(by) {
const fromOp = by === ctrl.data.opponent.color;
if (fromOp) ctrl.data.opponent.offeringPause = true;
else ctrl.data.player.offeringPause = true;
if (fromOp && !ctrl.data.player.offeringPause) notify(ctrl.noarg('yourOpponentOffersAnAdjournment'));
if (by) {
const fromOp = by === ctrl.data.opponent.color;
if (fromOp) ctrl.data.opponent.offeringPause = true;
else ctrl.data.player.offeringPause = true;
if (fromOp && !ctrl.data.player.offeringPause) notify(ctrl.noarg('yourOpponentOffersAnAdjournment'));
} else ctrl.data.player.offeringPause = ctrl.data.opponent.offeringPause = !!by;
ctrl.redraw();
},
resumeOffer(by) {
Expand Down

0 comments on commit e07737f

Please sign in to comment.