1 Star 0 Fork 87

何为/Landlords

forked from ibc-dabing/Landlords 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
card.h 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
kevin 提交于 2021-12-07 23:24 . add file
#ifndef CARD_H
#define CARD_H
#include <QVector>
class Card
{
public:
// 花色
enum CardSuit
{
Suit_Begin,
Diamond,
Club,
Heart,
Spade,
Suit_End
};
// 点数
enum CardPoint
{
Card_Begin,
Card_3,
Card_4,
Card_5,
Card_6,
Card_7,
Card_8,
Card_9,
Card_10,
Card_J,
Card_Q,
Card_K,
Card_A,
Card_2,
Card_SJ, // small joker
Card_BJ, // big joker
Card_End
};
Card();
Card(CardPoint point, CardSuit suit);
void setPoint(CardPoint point);
void setSuit(CardSuit suit);
CardPoint point() const;
CardSuit suit() const;
private:
CardPoint m_point;
CardSuit m_suit;
};
bool lessSort(const Card& c1, const Card& c2);
bool greaterSort(const Card& c1, const Card& c2);
bool operator <(const Card& c1, const Card& c2);
bool operator ==(const Card& left, const Card& right);
uint qHash(const Card& card);
using CardList = QVector<Card>;
#endif // CARD_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/diwangyinqing/landlords.git
git@gitee.com:diwangyinqing/landlords.git
diwangyinqing
landlords
Landlords
master

搜索帮助