示例#1
0
        public Card(suit s, value v, CardWindow c)
        {
            InitializeComponent();
            _suit  = s;
            _value = v;

            _faceShowing = false;

            Width  = _sizeX;
            Height = _sizeY;

            cardBorder.CornerRadius = new CornerRadius(_sizeX / 10);

            _myCanvas = c;
        }
示例#2
0
        public Deck()
        {
            name car        = name.Six;
            int  card_caunt = 0;

            for (int i = 0; i < 9; i++)
            {
                Card c;
                suit suit = suit.Heart;
                for (int j = 0; j < 4; j++)
                {
                    c = new Card(car, suit);
                    card_deck[card_caunt++] = c;

                    suit++;
                }
                car++;
            }
        }
示例#3
0
文件: Deck.cs 项目: AllenRMore/War
        /*
         * Generates a standard 52 card deck.
         */
        protected void GenerateCards()
        {
            // Keeps track of how many duplicates need to be made.
            int dupIter   = 0;
            int faceValue = 1;

            for (int i = 0; i < 52; i++)
            {
                // Increment face value when duplicates for that value have been created.
                if (dupIter > 3)
                {
                    faceValue++;
                    dupIter = 0;
                }
                suit currentSuit = (suit)(i % 4);
                Card nextCard    = new Card(currentSuit, faceValue);
                this.Cards.Push(nextCard);
                dupIter++;
            }
        }
示例#4
0
文件: main.cs 项目: kmdkuk/ThePoker
        private suit getsuit(int card)
        {
            suit s = new suit();
            int  d;

            if (card - 1 < 0)
            {
                d = 0;
            }
            else
            {
                d = (card - 1) / 13;
            }
            switch (d)
            {
            case 0:
                s = suit.SUIT_HEART;
                break;

            case 1:
                s = suit.SUIT_DIA;
                break;

            case 2:
                s = suit.SUIT_SPADE;
                break;

            case 3:
                s = suit.SUIT_CLOVER;
                break;

            case 4:
                s = suit.SUIT_JOKER;
                break;

            default:
                break;
            }
            return(s);
        }
示例#5
0
 public void Club()
 {
     Suit = suit.club;
 }
示例#6
0
 public void setCardSuit(suit cardSuit)
 {
     this.cardSuit = cardSuit;
 }
示例#7
0
文件: Program.cs 项目: StiubeAlex/POO
 public Card(rank Rank, suit Suit)
 {
     this.Rank = Rank;
     this.Suit = Suit;
 }
示例#8
0
 public card(int c, suit s)
 {
 }
示例#9
0
 public Deck(suit cs, rank cv) : base(cs, cv)
 {
 }
示例#10
0
 //constructor sets the card suit and number to what is passed in
 public Card(int suit, int number)
 {
     this.suit = (suit)suit;
     this.numbers = (numbers)number;
 }
示例#11
0
 //konstruktor
 public Card(value cardValue, suit cardSuit)
 {
     this.cardValue = cardValue;
     this.cardSuit  = cardSuit;
 }
示例#12
0
 public void Diamond()
 {
     Suit = suit.diamond;
 }
示例#13
0
 public void Spade()
 {
     Suit = suit.spade;
 }
示例#14
0
 public void Spade()
 {
     Suit = suit.spade;
 }
示例#15
0
 public void Heart()
 {
     Suit = suit.heart;
 }
示例#16
0
 public void Diamond()
 {
     Suit = suit.diamond;
 }
示例#17
0
 public void Club()
 {
     Suit = suit.club;
 }
示例#18
0
 public Card(name name, suit suit)
 {
     Name = name;
     Suit = suit;
 }
示例#19
0
 public void Heart()
 {
     Suit = suit.heart;
 }
示例#20
0
 //constructor
 public Card(suit cs, rank cv)
 {
     cardShape = cs;
     cardValue = cv;
 }
示例#21
0
 //constructor sets the card suit and number to what is passed in
 public Card(int suit, int number)
 {
     this.suit    = (suit)suit;
     this.numbers = (numbers)number;
 }
示例#22
0
 public Card(int v, suit s)
 {
     this.s     = s;
     this.value = v;
 }
示例#23
0
 public Card(rank r, suit s)
 {
     Rank       = r;
     Suit       = s;
     IsFaceDown = true;
 }
示例#24
0
文件: Card.cs 项目: AllenRMore/War
 public Card(suit suit, int faceValue)
 {
     this.Suit      = suit;
     this.FaceValue = faceValue;
 }