/// <summary>Will the specified suit be "the 4th suit" when bid?</summary> /// <param name="nieuweKleur">The suit that will be bid</param> /// <returns>True when the specified suit has not been bid before</returns> public bool WordtVierdeKleur(Suits nieuweKleur) { SuitCollection <bool> genoemd = new SuitCollection <bool>(false); genoemd[nieuweKleur] = true; byte nr = 2; while (nr <= this.AantalBiedingen) { if (this.Terug(nr).IsRegular) { Suits cl = this.Terug(nr).Suit; if (cl != Suits.NoTrump) { genoemd[cl] = true; } } nr += 2; } bool result = true; for (Suits cl = Suits.Clubs; cl <= Suits.Spades; cl++) { if (!genoemd[cl]) { result = false; } } return(result); }
/// <summary>Get the 4th suit</summary> /// <value>?</value> public Suits WasVierdeKleur(int skip) { SuitCollection <bool> genoemd = new SuitCollection <bool>(false); Suits result = Suits.NoTrump; int nr = 2 + skip; while (nr <= this.AantalBiedingen) { if (this.Terug(nr).IsRegular) { genoemd[this.Terug(nr).Suit] = true; } nr += 2; } nr = 0; for (Suits cl = Suits.Clubs; cl <= Suits.Spades; cl++) { if (!genoemd[cl]) { result = cl; nr++; } } if (nr > 1) { result = Suits.NoTrump; } return(result); }