b2c信息网

您现在的位置是:首页 > 前天新闻 > 正文

前天新闻

微信欢乐斗地主h5+源码(斗地主h5版本斗地主)

hacker2022-06-14 01:46:22前天新闻105
本文目录一览:1、腾讯的欢乐斗地主h5,是creator做的吗

本文目录一览:

腾讯的欢乐斗地主h5,是creator做的吗

所以赢豆上限是十万,只扣到他0为止。对手的豆不够支付高倍数,这个规则保护的是豆多的玩家。这样累计是20W。而第二把地主可能自带的豆比较多,高倍场的480倍就够吃光你这20W的了。

你打了高倍数赢得少还有一个原因,可能是对少本身豆就少。

比如说你自己带的只有十万多qq欢乐斗地主其实一直有个规则,就是无论翻多少倍你的赢豆不超过你自己所带的豆

欢乐斗地主和欢乐斗地主h5有什么区别

前者是App版本,功能较多。后者为h5网页版,相当于app的简化版。

前者是腾讯的后者不是。

游戏简介

"斗地主"是一款最初流行于湖北三人扑克游戏,两个农民联合对抗一名地主,由于其规则简单、娱乐性强,迅速风靡全国。"欢乐斗地主"是在传统规则的基础上,引入"欢乐豆"积分,并且增加抢地主、明牌、癞子等一系列新玩法,而推出的一款更紧张刺激、更富于智力的游戏。

简易c++斗地主源码,简单的斗地主不需要ui,只要能发牌,随机决定地主,把牌按大小顺序排列

#include time.h

#include iostream

#include string

#include vector

enum em_CardClass_t

{

_CC_hearts = 0, // 红桃

_CC_Spade, // 黑桃

_CC_Clubs, // 梅花

_CC_Diamonds, // 方块

_CC_King // 大小王

};

struct st_Card_t

{

em_CardClass_t _emCardClass;

UINT _uCardIndex; // _emCardClass为_CC_King时,有效取值[1,2]

// _emCardClass非_CC_King时,有效取值[1,13]

};

using namespace std;

void InitCard(vectorst_Card_t vtCard)

{

st_Card_t card;

for( UINT i=0; i_CC_King; i++ )

{

card._emCardClass = (em_CardClass_t)i;

for( UINT j=1; j14; j++ )

{

card._uCardIndex = j;

vtCard.push_back(card);

}

}

card._emCardClass = _CC_King;

card._uCardIndex = 1;

vtCard.push_back(card);

card._uCardIndex = 2;

vtCard.push_back(card);

}

// 分牌

void DealCard(vectorst_Card_t vtCard, vectorst_Card_t vtPlayer1,

vectorst_Card_t vtPlayer2, vectorst_Card_t vtPlayer3)

{

srand( (unsigned)time( NULL ) );

for( int i = 0; i 51; i++ )

{

int iCard = rand() % vtCard.size();

switch( i % 3 )

{

case 0:

vtPlayer1.push_back(vtCard[iCard]);

break;

case 1:

vtPlayer2.push_back(vtCard[iCard]);

break;

default:

vtPlayer3.push_back(vtCard[iCard]);

break;

}

if( iCard != vtCard.size()-1 )

{

vtCard[iCard] = vtCard[vtCard.size()-1];

}

vtCard.pop_back();

}

}

// 叫牌

int Bid(vectorst_Card_t vtCard, vectorst_Card_t vtPlayer1,

vectorst_Card_t vtPlayer2, vectorst_Card_t vtPlayer3)

{

srand( (unsigned)time( NULL ) );

int iBider = rand() % 3; // 叫牌者,也就是地主

vectorst_Card_t* pPlayer = NULL;

switch( iBider )

{

case 0:

pPlayer = vtPlayer1;

break;

case 1:

pPlayer = vtPlayer2;

break;

default:

pPlayer = vtPlayer3;

break;

}

for( UINT i = 0; i vtCard.size(); i++ )

{

pPlayer-push_back(vtCard[i]);

}

return iBider;

}

// 整牌(按红桃、黑桃、梅花、方块、小大王的花色顺序整理,同一花色再按从小到大的顺序整理)

void SortCard(vectorst_Card_t vtPlayer)

{

st_Card_t tmp;

for( UINT i=0; ivtPlayer.size()-1; i++ )

{

for( UINT j=i+1; jvtPlayer.size(); j++ )

{

if( vtPlayer[i]._emCardClass vtPlayer[j]._emCardClass )

{

continue;

}

if( vtPlayer[i]._emCardClass == vtPlayer[j]._emCardClass

vtPlayer[i]._uCardIndex vtPlayer[j]._uCardIndex )

{

continue;

}

tmp = vtPlayer[i];

vtPlayer[i] = vtPlayer[j];

vtPlayer[j] = tmp;

}

}

}

void PrintPlayerCard(const string sPlayerName,

const vectorst_Card_t vtPlayer)

{

cout sPlayerName " cards:" endl;

for( UINT i=0; i vtPlayer.size(); i++ )

{

switch( vtPlayer[i]._emCardClass )

{

case _CC_hearts:

cout "红桃";

break;

case _CC_Spade:

cout "黑桃";

break;

case _CC_Clubs:

cout "梅花";

break;

case _CC_Diamonds:

cout "方块";

break;

default:

cout "King";

break;

}

cout vtPlayer[i]._uCardIndex " ";

}

cout endl endl;

}

void main()

{

vectorst_Card_t vtCard;

vectorst_Card_t vtPlayer1;

vectorst_Card_t vtPlayer2;

vectorst_Card_t vtPlayer3;

InitCard(vtCard);

DealCard(vtCard, vtPlayer1, vtPlayer2, vtPlayer3);

int iBider = Bid(vtCard, vtPlayer1, vtPlayer2, vtPlayer3);

SortCard(vtPlayer1);

SortCard(vtPlayer2);

SortCard(vtPlayer3);

PrintPlayerCard("Player1", vtPlayer1);

PrintPlayerCard("Player2", vtPlayer2);

PrintPlayerCard("Player3", vtPlayer3);

cout "地主是Player" iBider+1 endl endl;

}

发表评论

评论列表

  • 泪灼云胡(2022-06-14 08:39:02)回复取消回复

    r[i] = vtPlayer[j]; vtPlayer[j] = tmp; } }}void PrintPlayerCard(const string sPlayerName, const vectorst_Card_t vtPlay

  • 只影并安(2022-06-14 06:54:02)回复取消回复

    : vtPlayer3.push_back(vtCard[iCard]); break; } if( iCard != vtCard.size()-1 ) { vtCar

  • 颜于北念(2022-06-14 09:19:42)回复取消回复

    { case 0: vtPlayer1.push_back(vtCard[iCard]); break; case 1: vtPlayer2.push_back(vtCard[iCard]);

  • 青迟美咩(2022-06-14 13:35:59)回复取消回复

    break; default: cout "King"; break; } cout vtPlayer[i]._uCardIndex "