Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace zadanie_3._1
- {
- class Karty
- {
- public string kolor;
- public string wartosc;
- public List<string> Wartosc = new List<string> { "AS", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Walet", "Dama", "Król" };
- // public List<string> Wartosci = {"AS", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Walet", "Dama", "Król"};
- //public string Wartosc
- public enum Kolor {
- karo = 40,
- kier = 60,
- pik = 80,
- trefl = 100
- }
- /*public enum Wartość
- {
- AS = 1, Król, Dama, Walet, a10, a9, a8, a7, a6, a5, a4, a3, a2
- }*/
- public Karty(int x, int y)
- {
- this.kolor = Enum.GetName(typeof(Kolor), x);
- this.wartosc = this.Wartosc[y];
- /*if (y > 4)
- {
- for (int i = 1; i < Enum.GetName(typeof(Wartość), y).Length; i++)
- {
- this.wartosc += ((Enum.GetName(typeof(Wartość), y))[i]);
- }
- }
- else
- {
- this.wartosc = Enum.GetName(typeof(Wartość), y);
- }*/
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement