if (this.count === 31) {
this.clear_pegging();
}
- this.active = this.player_after(user_action.username, username => !this.passed.has(username) || this.hands.has(username) && this.hands.get(username).length > 0);
+ this.active = this.player_after(user_action.username, username => !this.passed.has(username) && this.hands.has(username) && this.hands.get(username).length > 0);
this.redraw_cards();
this.redraw_players();
break;
if (this.passed.size === this.hands.size) {
this.clear_pegging();
}
- this.active = this.player_after(user_action.username, username => !this.passed.has(username) || this.hands.has(username) && this.hands.get(username).length > 0);
+ this.active = this.player_after(user_action.username, username => !this.passed.has(username) && this.hands.has(username) && this.hands.get(username).length > 0);
this.redraw_cards();
this.redraw_players();
break;
}
}
if (player_after_seat === null) for (const [username, seat] of this.seats) {
- if (is_playing(username) && player_after_seat === null || seat < player_after_seat) {
+ if (is_playing(username) && (player_after_seat === null || seat < player_after_seat)) {
player_after = username;
player_after_seat = seat;
}