package tools.cn;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Demo {
static String[] suits = { "黑桃", "红桃", "梅花", "方片" };
static String[] ranks = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "大王", "小王" };
public static void main(String[] args) {
Listpukes = makeShufflePuke();
//发牌 斗地主
int index = 0;
for (String string : pukes) {
System.out.print(string + " ");
index++;
if (index % 17 == 0) {
System.out.println();
}
}
}
private static ListmakeShufflePuke() {
Listpukes = new ArrayList ();
for (int i = 0; i < suits.length; i++) {
for (int j = 0; j < ranks.length - 2; j++) {
pukes.add(suits[i] + "_" + ranks[j]);
}
}
pukes.add(ranks[ranks.length - 2]);
pukes.add(ranks[ranks.length - 1]);
Collections.shuffle(pukes);
return pukes;
}
}
for(int i=0;i