SyntaxSquad/DADProject#16 fix: i forgot this
This commit is contained in:
@@ -189,7 +189,9 @@ class BiscaGame {
|
||||
this.players[winnerId].tricks += 1;
|
||||
this.currentTurn = winnerId;
|
||||
|
||||
if (this.type == 3) {
|
||||
// --- CRITICAL FIX: Always draw if cards remain ---
|
||||
// Removed "if (this.type == 3)" check
|
||||
if (this.deck.length > 0 || this.trumpCard) {
|
||||
this.drawCard(winnerId);
|
||||
this.drawCard(this.getOpponentId(winnerId));
|
||||
}
|
||||
@@ -221,7 +223,7 @@ class BiscaGame {
|
||||
? p2Obj.id
|
||||
: p1Obj.id;
|
||||
|
||||
return {
|
||||
const result = {
|
||||
action: "game_ended",
|
||||
trickResult,
|
||||
winnerId: finalWinner,
|
||||
@@ -233,6 +235,7 @@ class BiscaGame {
|
||||
player2_points: p2Obj.points,
|
||||
totalTime: totalTime,
|
||||
};
|
||||
|
||||
if (this.onGameEnd) {
|
||||
this.onGameEnd(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user