package PokerDemo;
/*
* 第一次 做的
*/
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class PokerTest {
public static void main(String[] args) {
//创造牌盒
HashMap<Integer, String> pokerBox=new HashMap<>();
//创造颜色
ArrayList<String> colors=new ArrayList<String>();
Collections.addAll(colors, "♦","♣","♥","♠");
//创造数字
ArrayList<String> numbers=new ArrayList<String>();
Collections.addAll(numbers, "3","4","5","6","7","8","9","10","J","Q","K","A","2");
int count=1;
//HashSet<Integer> num=new HashSet<Integer>();
ArrayList<Integer> num=new ArrayList<Integer>();
//创造牌面
for (String nums: numbers) {
for (String cs :colors ) {
num.add(count);
pokerBox.put(count++, cs+nums);
}
}
num.add(count);
pokerBox.put(count++, "小 |
|