public new CardSetScore Score(CardSet set) { bool validate = colorValidator.Validate(set); return(!validate ? new CardSetScore(Name) : base.Score(set)); }
public new CardSetScore Score(CardSet set) { bool validate = colorValidator.Validate(set); var score = base.Score(set); return(validate && score.IsValid ? new CardSetScore(Name, 9) : new CardSetScore(Name)); }
public CardSetScore Score(CardSet set) { bool isValid = validator.Validate(set); if (isValid) { return(new CardSetScore(Name, 5)); } return(new CardSetScore(Name)); }
public CardSetScore Score(CardSet set) { bool sameColor = colorValidator.Validate(set); if (!sameColor) { return(new CardSetScore(Name)); } bool valid = set.Cards.All(Validate); return(valid ? new CardSetScore(Name, 10) : new CardSetScore(Name)); }
public CardSetScore Score(CardSet set) { bool sameColor = colorValidator.Validate(set); if (!sameColor) { return(new CardSetScore(Name)); } if (set.Cards .Select(card => card.Value) .Distinct() .ToList().Count != 5) { return(new CardSetScore(Name)); } bool valid = set.Cards.All(Validate); return(valid ? new CardSetScore(Name, 12) : new CardSetScore(Name)); }