mirror of
https://github.com/jie65535/Ancient-Spider.git
synced 2024-07-27 18:54:53 +08:00
提交源码
编译环境 VS2017
This commit is contained in:
37
蜘蛛纸牌/Card.h
Normal file
37
蜘蛛纸牌/Card.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "CardType.h"
|
||||
|
||||
class Card
|
||||
{
|
||||
private:
|
||||
CardValue _Value;
|
||||
CardType _Type;
|
||||
public:
|
||||
Card() {}
|
||||
Card(CardValue value, CardType type)
|
||||
:_Value(value), _Type(type) {}
|
||||
~Card() {}
|
||||
|
||||
CardValue GetValue() const
|
||||
{
|
||||
return _Value;
|
||||
}
|
||||
|
||||
CardType GetType() const
|
||||
{
|
||||
return _Type;
|
||||
}
|
||||
|
||||
bool operator<(const Card & card) const
|
||||
{
|
||||
return _Value < card._Value;
|
||||
}
|
||||
|
||||
bool operator<(const CardValue & value) const
|
||||
{
|
||||
return _Value < value;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user