一副牌有52张(除去大小王),总共有13种牌,每种牌有4中花色,首先我们要先构造出一副完整的牌,然后对牌进行打乱,最后可以发给j个人,每个人发i张牌
package datastruct;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;
public class Poker {
//一副牌13种,每种牌有4中suit,用list来实现
public static void main(String[] args) {
List<Card> c=buyCard();
System.out.println(c);
List<Card> c1=shuffle(buyCard());
System.out.println(c1);
List<List<Card>> plays=put(c1);
System.out.println("剩下的牌:");
System.out.println(c1);
System.out.println("1好玩家的牌:");
System.out.println(plays.get(0));
System.out.println("2号玩家的牌:");
System.out.println(plays.get(1));
System.out.println("3号玩家的牌:");
System.out.println(plays.get(