hasTeamWon function
In teams mode: returns true if both players on team have all 4
pieces finished (8 pieces total).
In standard mode (teams == null) this is never called — use
hasPlayerWon directly.
Implementation
bool hasTeamWon(List<LudoPiece> pieces, LudoTeam team) {
return team.playerIndices.every((pi) => hasPlayerWon(pieces, pi));
}