public List <int> Results() { var claimIdsWithoutOverlap = new List <int>(); var positionsWithClaims = FabricWithClaims.PositionsWithClaims(); foreach (var claims in positionsWithClaims.Values) { foreach (var claim in claims) { claimIdsWithoutOverlap.Add(claim.ClaimId); } } claimIdsWithoutOverlap = claimIdsWithoutOverlap.Distinct().ToList(); foreach (FabricPosition fabricPosition in positionsWithClaims.Keys) { var claims = positionsWithClaims[fabricPosition]; if (claims.Count != 1) { foreach (Claim claimToRemove in claims) { claimIdsWithoutOverlap.Remove(claimToRemove.ClaimId); } } } return(claimIdsWithoutOverlap); }
public int Results() { int squareInchesWithClaims = 0; var positionsWithClaims = FabricWithClaims.PositionsWithClaims(); foreach (FabricPosition fabricPosition in positionsWithClaims.Keys) { var claims = positionsWithClaims[fabricPosition]; if (claims.Count >= ClaimsCount) { squareInchesWithClaims++; } } return(squareInchesWithClaims); }
public ClaimsWithNoOverlapQuery(FabricWithClaims fabricWithClaims) { FabricWithClaims = fabricWithClaims; }
public FabricWithAtleastClaimsQuery(FabricWithClaims fabricWithClaims, int claimsCount) { FabricWithClaims = fabricWithClaims; ClaimsCount = claimsCount; }