Worked on c++
This commit is contained in:
15
shenzhen_solitaire/c++/include/card.hpp
Normal file
15
shenzhen_solitaire/c++/include/card.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
namespace solitaire {
|
||||
enum class CardType : int { Zhong, Bai, Fa, Hua, Red, Green, Black };
|
||||
|
||||
auto isNormalCardType(CardType type) -> bool;
|
||||
|
||||
struct Card {
|
||||
CardType type;
|
||||
int value;
|
||||
[[nodiscard]] auto toString() const noexcept -> std::string;
|
||||
};
|
||||
} // namespace solitaire
|
||||
Reference in New Issue
Block a user