示例#1
0
        public Card(int color, int number)
        {
            int i = 0;

            foreach (var tmp in CardEnum.Values)
            {
                if (i == color - 1)
                {
                    this.color = tmp;
                    break;
                }
                i++;
            }
            i = 0;
            foreach (var tmp in CardNbEnum.Values)
            {
                if (i == number - 7)
                {
                    this.number = tmp;
                    break;
                }
                i++;
            }
        }
示例#2
0
 public Card(CardEnum color, CardNbEnum number)
 {
     this.color  = color;
     this.number = number;
 }