kukai
package poker;

import java.util.*;

public class Poker002 {
public static void main(String[] args) {
String[] num = {"3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "2"};
String[] color = {"♥", "♣", "♦", "♠"};
//用双列集合来装牌
HashMap<Integer, String> poker = new HashMap<>();
List<Integer> arrIndex = new ArrayList<>();
int index = 0;
for (String n : num) {
for (String c : color) {
arrIndex.add(index);
poker.put(index, c.concat(n));
index++;
}
}
arrIndex.add(index);
poker.put(index, "

分类:

技术点:

相关文章:

  • 2021-11-08
  • 2022-02-18
  • 2021-11-19
  • 2021-09-12
  • 2022-02-25
  • 2021-10-12
  • 2021-11-24
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-06-24
  • 2021-04-30
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案