规则介绍
斗地主发牌规则为每人17张牌,剩余3张牌给地主
发牌原理
1.生成一个54大小的int数组,用于保存待发的所有牌
int pokersInGrantPool[POKER_COUNT];
int grantCount;
2.随机一个1-剩余发牌数量的随机数
3.更新int数组,移除当前索引并调整之后的索引用作下次发牌
int PokerUnit::randomPoker(){
int remaidCount=POKER_COUNT-grantCount;
int pokerIndex=rand()%remaidCount;
int poker=pokersInGrantPool[pokerIndex];
for (int i=pokerIndex; i
4.更新随机数种子
5.更新当前玩家牌组