class Play21{
int[] cards,computer,human;//定义一副54张牌,电脑5张,玩家5张
Scanner sr=new Scanner(System.in);
public Play21(){//构造方法
cards=new int[54];//定义54个大小的数组表示扑克牌
Arrays.fill(cards,0);//54张牌全赋值零,一旦某一张牌被用了就赋1
computer=new int[5];//电脑5张牌
Arrays.fill(computer,0);
human=new int[5];//人5张牌
Arrays.fill(human,0);
}
public void clear(){//使数组内所有数据赋值0没有用过,用过的赋值1
Arrays.fill(cards,0);
Arrays.fill(computer,0);
Arrays.fill(human,0);
}
public void start(){//开始游戏
System.out.println("*************************************");
System.out.println("开始游戏!");
int n=3;
for(int i=0;i<3;i++){//电脑和玩家先各抽3张
computer[i]=n