package com.map;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.TreeSet;
//斗地主
public class Test_Game {
public static void main(String[] args) {
// TODO Auto-generated method stub
String[] num = { "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "2" };
String[] color = { "梅花", "方片", "黑桃", "红心" };
HashMap<Integer, String> hm = new HashMap<>();
ArrayList<Integer> list = new ArrayList<>(); // 存储索引
int index = 0;
for (String s1 : num) {
for (String s2 : color) {
hm.put(index, s2.concat(s1)); // 连接两个字符串并添加到hm中
list.add(index);
index++;
}
}
hm.put(index, "大王");
list.add(index);
index++;
hm.put(index, "小王")