void give_diller() { while (diller.kol_diller <= 17) { if ((diller.all_cards_diller == 0)) { FirstIter.first_iter(ref player.bid, player.coins); diller.cards_for_diller[diller.all_cards_diller] = cld[peek]; if (cld[peek].val == 1) { diller.kol_diller += 11; } else { diller.kol_diller += cld[peek].val; } Console.WriteLine("first card: " + cld[peek].name + " " + cld[peek].suit + " (summa: " + diller.kol_diller + " )"); diller.all_cards_diller++; peek++; diller.cards_for_diller[diller.all_cards_diller] = cld[peek]; } else { if (((cld[peek].val == 1) && (diller.kol_diller + 11 > 21)) || (cld[peek].val != 1)) { diller.cards_for_diller[diller.all_cards_diller] = cld[peek]; } else { diller.cards_for_diller[diller.all_cards_diller] = cld[peek]; diller.cards_for_diller[diller.all_cards_diller].val = 11; } } if (((cld[peek].val == 1) && (diller.kol_diller + 11 > 21)) || (cld[peek].val != 1)) { diller.kol_diller += diller.cards_for_diller[diller.all_cards_diller].val; } else { diller.kol_diller += 11; } Console.WriteLine("SECRET card for diller: " + cld[peek].name + " " + cld[peek].suit + " (summa: " + diller.kol_diller + " )"); diller.all_cards_diller++; peek++; if (diller.all_cards_diller == 2) { break; } } }
public void GiveDiller(Game play) { while (kol_diller <= 17) { if ((all_cards_diller == 0)) { FirstIter.first_iter(ref play.player.bid, play.player.coins); cards_for_diller[all_cards_diller] = play.cld[play.peek]; if (play.cld[play.peek].val == 1) { kol_diller += 11; } else { kol_diller += play.cld[play.peek].val; } Console.WriteLine("first card: " + play.cld[play.peek].name + " " + play.cld[play.peek].suit + " (summa: " + kol_diller + " )"); all_cards_diller++; play.peek++; cards_for_diller[all_cards_diller] = play.cld[play.peek]; } else { if (((play.cld[play.peek].val == 1) && (kol_diller + 11 > 21)) || (play.cld[play.peek].val != 1)) { cards_for_diller[all_cards_diller] = play.cld[play.peek]; } else { cards_for_diller[all_cards_diller] = play.cld[play.peek]; cards_for_diller[all_cards_diller].val = 11; } } if (((play.cld[play.peek].val == 1) && (kol_diller + 11 > 21)) || (play.cld[play.peek].val != 1)) { kol_diller += cards_for_diller[all_cards_diller].val; } else { kol_diller += 11; } Console.WriteLine("SECRET card for diller: " + play.cld[play.peek].name + " " + play.cld[play.peek].suit + " (summa: " + kol_diller + " )"); all_cards_diller++; play.peek++; if (all_cards_diller == 2) { break; } } }