hasTeamWon function

bool hasTeamWon(
  1. List<LudoPiece> pieces,
  2. LudoTeam team
)

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));
}