public player() { c1 = new cards(); c2 = new cards(); c3 = new cards(); t2 = kinds.none; sum = 0; t1 = 0; t4 = state.none; }
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(); }
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); } }
public cards(cards t) { cardcolor = t.cardcolor; digital = t.digital; }