/*项目三*/
using System;
using System.Collectioneric;
using Sysext;
using Systreading;
namespace ConsoleApplication2
{
class Game
{
string[] str = new string[52];
int[] number = new int[52];
int i = 0;
int[] a = new int[4];
int[] b = new int[4];
int[] c = new int[4];
int[] d = new int[4];
int[] e = new int[4];
Random ra = new Random(unchecked((int)DateTim.Ticks));
public void getnum(int[] number, int minnum, int maxnum)
{
int flag;
flag= number[i] = xt(0, 52);
int f = 0;
while (f< i)
{
if (number[f] == flag)
getnum(number, 0, 52);
f++;
}
}
public void GetRandomNum()//给number随机赋从0到51不同的值
{
while (i < 52)
{
int flag;
flag = number[i] = rt(0, 52);
int f = 0;
while (f < i)
{
if (number[f] == flag)
{
getnum(number, 0, 52);
break;
}
f++;
}
i++;
}
}
public void EnterCard()//给每个字符串数组赋上牌值
{
str[0] ="1 of the club";
str[1] = "2 of the club";
str[2] = "3 of the club";
str[3] = "4 of the club";
str[4]= "5 of the club";
str[5] ="6 of
C 纸牌小游戏代码 来自淘豆网www.taodocs.com转载请标明出处.