isCellVisible method

bool isCellVisible(
  1. GlobalVectorDefinition cell, [
  2. Channel? id
])

Implementation

bool isCellVisible(GlobalVectorDefinition cell, [Channel? id]) {
  bool isClaimed = false, isMyTeam = false;
  for (final entry in info.teams.entries) {
    final name = entry.key;
    final team = entry.value;
    if (team.claimedCells.contains(cell)) {
      isClaimed = true;
      if (teamMembers[name]?.contains(id ?? this.id) ?? false) {
        isMyTeam = true;
        break;
      }
    }
  }
  return !isClaimed || isMyTeam;
}