1 Star 0 Fork 82

陆门马 / Landlords

forked from ibc-dabing / Landlords 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cards.h 928 Bytes
一键复制 编辑 原始数据 按行查看 历史
kevin 提交于 2021-12-16 00:16 . 代码优化, 提高程序的健壮性
#ifndef CARDS_H
#define CARDS_H
#include "card.h"
#include <QSet>
class Cards
{
public:
enum SortType{Asc, Desc, NoSort};
Cards();
explicit Cards(const Card& card);
void add(const Card& card);
void add(const Cards& cards);
void add(const QVector<Cards>& cards);
Cards& operator <<(const Card& card);
Cards& operator <<(const Cards& cards);
void remove(const Card& card);
void remove(const Cards& cards);
void remove(const QVector<Cards>& cards);
int cardCount();
bool isEmpty();
bool isEmpty() const;
void clear();
Card::CardPoint maxPoint();
Card::CardPoint minPoint();
int pointCount(Card::CardPoint point);
bool contains(const Card& card);
bool contains(const Cards& cards);
Card takeRandomCard();
CardList toCardList(SortType type = Desc);
void printAllCardInfo();
private:
QSet<Card> m_cards;
};
#endif // CARDS_H
1
https://gitee.com/lumenma/landlords.git
git@gitee.com:lumenma/landlords.git
lumenma
landlords
Landlords
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891