private void Losuj() { var TaliaKart = ObsugaKart.WylousjMałąTalie(); Musek = TaliaKart.RandAndDelete(3).ToArray(); for (int i = 0; i < 3; i++) { KartyGracza[i] = TaliaKart.RandAndDelete(7); } }
public static IEnumerable <Karta> GetAllQueenIfMariage(IEnumerable <Karta> kw) { int[] CountMariageCard = new int[4]; foreach (var item in kw) { var k = item.PobierzKarte(); if (k == Karta.Król || k == Karta.Dama) { CountMariageCard[(int)item.Kolor()]++; } } for (int i = 0; i < CountMariageCard.Length; i++) { if (CountMariageCard[i] == 2) { yield return(ObsugaKart.StwórzKarte(Karta.Dama, (Karta)i)); } } }