static void Main(string[] args) { Pet thisPet; Dog dog = new Dog(); Cat cat = new Cat(); IDog iDog = new IDog(); ICat iCat = new ICat(); Pets pets = new Pets(); Random rand = new Random(); for (int x = 0; x > 51; x++) { if (rand.Next(1, 11) == 1) { // 50% chance of adding a dog if (rand.Next(0, 2) == 0) { dog.Add(dog); } else { // else add a cat cat.Add(cat); } } else { thisPet = pets.petList; } } }
private void PutCardInDog() { Card card = deck.Take(); if (card != null) { dog.Add(card); } }
public void PutCardsInDog() { if (selectedCards.Count == nDog) { foreach (Card card in selectedCards.Value) { Taker.Hand.Remove(card); dog.Add(card); Debug.Log("Added " + card + " in the dog"); } FinishProcess(); } else { Debug.Log("You should put " + nDog + " cards in the dog"); } }