package com.by.cmweb;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
/******
* @Author:Mr.ran &DATE:2020/12/23 10:07
*<p>
* @package: PACKAGE_NAME;
*<p>
* @Description:
******/
public class TestMain {
public static void main(String[] args) {
//装牌的集合
List<String> poker = new ArrayList<>();
//需要生成的牌
List<String> reserveCard = new ArrayList<>();
//符号
List<String> symbol = new ArrayList<>();
Collections.addAll(symbol, "♥", "♠", "♦", "♣");
//生成牌
Collections.addAll(poker, "大王", "小王");
Collections.addAll(reserveCard, "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "2");
for (String s : reserveCard) {
for (String bs : symbol) {
poker.
利用JAVA实现发牌-->洗牌-->理牌的过程(话不多说直接上代码)
最新推荐文章于 2023-05-21 16:51:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)