chore(SCOPONE-0006): complete iteration 0 — fix scopa rule and improve AI intelligence
This commit is contained in:
@@ -147,10 +147,13 @@ export function applyMove(
|
||||
// Add played card + captured to player's pile
|
||||
player.pile.push(card, ...capturedCards);
|
||||
|
||||
// Scopa: cleared the table
|
||||
// Scopa: cleared the table (but NOT on the last play of the round)
|
||||
if (state2.table.length === 0) {
|
||||
player.scope += 1;
|
||||
isScopa = true;
|
||||
const allHandsEmptyNow = state2.players.every(p => p.hand.length === 0);
|
||||
if (!allHandsEmptyNow) {
|
||||
player.scope += 1;
|
||||
isScopa = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Track which team made last capture
|
||||
|
||||
Reference in New Issue
Block a user