18 Star 375 Fork 79

ibc-dabing / Landlords

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
player.cpp 2.10 KB
一键复制 编辑 原始数据 按行查看 历史
kevin 提交于 2021-12-16 00:16 . 代码优化, 提高程序的健壮性
#include "player.h"
Player::Player(QObject *parent) : QObject(parent)
{
}
Player::Player(QString name, QObject *parent) : Player(parent)
{
m_name = name;
}
void Player::setName(QString name)
{
m_name = name;
}
QString Player::getName()
{
return m_name;
}
void Player::setRole(Role role)
{
m_role = role;
}
Player::Role Player::getRole()
{
return m_role;
}
void Player::setSex(Sex sex)
{
m_sex = sex;
}
Player::Sex Player::getSex()
{
return m_sex;
}
void Player::setDirection(Direction direction)
{
m_direction = direction;
}
Player::Direction Player::getDirection()
{
return m_direction;
}
void Player::setType(Type type)
{
m_type = type;
}
Player::Type Player::getType()
{
return m_type;
}
void Player::setScore(int score)
{
m_score = score;
}
int Player::getScore()
{
return m_score;
}
void Player::setWin(bool flag)
{
m_isWin = flag;
}
bool Player::isWin()
{
return m_isWin;
}
void Player::setPrevPlayer(Player *player)
{
m_prev = player;
}
void Player::setNextPlayer(Player *player)
{
m_next = player;
}
Player *Player::getPrevPlayer()
{
return m_prev;
}
Player *Player::getNextPlayer()
{
return m_next;
}
void Player::grabLordBet(int point)
{
emit notifyGrabLordBet(this, point);
}
void Player::storeDispatchCard(const Card &card)
{
m_cards.add(card);
Cards cs;
cs.add(card);
emit notifyPickCards(this, cs);
}
void Player::storeDispatchCard(const Cards &cards)
{
m_cards.add(cards);
emit notifyPickCards(this, cards);
}
Cards Player::getCards()
{
return m_cards;
}
void Player::clearCards()
{
m_cards.clear();
}
void Player::playHand(const Cards &cards)
{
m_cards.remove(cards);
emit notifyPlayHand(this, cards);
}
Player *Player::getPendPlayer()
{
return m_pendPlayer;
}
Cards Player::getPendCards()
{
return m_pendCards;
}
void Player::storePendingInfo(Player *player, const Cards &cards)
{
m_pendPlayer = player;
m_pendCards = cards;
}
void Player::prepareCallLord()
{
}
void Player::preparePlayHand()
{
}
void Player::thinkCallLord()
{
}
void Player::thinkPlayHand()
{
}
1
https://gitee.com/subingwen/landlords.git
git@gitee.com:subingwen/landlords.git
subingwen
landlords
Landlords
master

搜索帮助