洗牌问题 代码我想这样写 感觉逻辑没问题啊 但运行不出效果 请指教?
System.out.println("开始洗牌");
do{
int ran=(int)(Math.random()*52);
Poker p=poke.get(ran);
if(poke1.contains(p)){
continue;
}else{
poke1.add(p);
}
}while(poke1.size()<=52);
System.out.println("洗牌后顺序:");
for(Poker p:poke1){
System.out.print(p.color+p.number+" ");
}
}