Example #1
0
 public player()
 {
     c1  = new cards();
     c2  = new cards();
     c3  = new cards();
     t2  = kinds.none;
     sum = 0;
     t1  = 0;
     t4  = state.none;
 }
Example #2
0
 public carddeck()
 {
     allcard = new List <cards>();
     for (int i = 0; i < 4; i++)
     {
         for (int j = 2; j < 15; j++)
         {
             cards t = new cards()
             {
                 cardcolor = (cardcolor)i,
                 digital   = (digital)j
             };
             allcard.Add(t);
         }
     }
     shuffle();
 }
Example #3
0
 public cards drawacard()
 {
     if (allcards.Count == 0)
     {
         cards t = new cards()
         {
             cardcolor = cardcolor.none,
             digital   = digital.none
         };
         return(t);
     }
     else
     {
         cards t = new cards(allcards[0]);
         allcards.RemoveAt(0);
         return(t);
     }
 }
Example #4
0
 public cards(cards t)
 {
     cardcolor = t.cardcolor;
     digital   = t.digital;
 }