Beispiel #1
0
        static void Main(string[] args)
        {
            TaliaKart talia  = new TaliaKart();
            TaliaKart talia2 = new TaliaKart(50, "zielony");

            talia.PokazTalieKart();
            Console.ReadKey();

            Karta karta = new Karta();

            karta.Symbol = "5";
            Console.WriteLine(karta.Symbol);
        }
Beispiel #2
0
        public TaliaKart()
        {
            this.ListaKart = new List <Karta>();
            Karta krol = new Karta();

            krol.Symbol  = "K";
            krol.nazwa   = "Krol";
            krol.wartosc = 13;
            krol.kolor   = "pik";
            this.ListaKart.Add(krol);
            this.ListaKart.Add(new Karta()
            {
                nazwa = "Dwa", Symbol = "2", wartosc = 2, kolor = "pik"
            });
            this.ListaKart.Add(new Karta()
            {
                nazwa = "As", Symbol = "A", wartosc = 1, kolor = "kier"
            });
            this.ListaKart.Add(new Karta()
            {
                nazwa = "Walet", Symbol = "J", wartosc = 11, kolor = "kier"
            });
            this.ListaKart.Add(new Karta()
            {
                nazwa = "Walet", Symbol = "J", wartosc = 11, kolor = "trefl"
            });
            this.ListaKart.Add(new Karta()
            {
                nazwa = "Dama", Symbol = "D", wartosc = 12, kolor = "trefl"
            });
            this.ListaKart.Add(new Karta()
            {
                nazwa = "Osemka", Symbol = "8", wartosc = 8, kolor = "karo"
            });
            this.ListaKart.Add(new Karta()
            {
                nazwa = "Krol", Symbol = "K", wartosc = 13, kolor = "karo"
            });

            this.kolor = "czerwony";
            this.cena  = 5;
        }