-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcard.h
More file actions
34 lines (22 loc) · 691 Bytes
/
Copy pathcard.h
File metadata and controls
34 lines (22 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef CARD_H
#define CARD_H
#include <string>
#include <map>
#include <vector>
#include <iostream>
enum class Color {Heart, Diamond, Club, Spade};
enum class RenderColor {Red, Black};
extern const std::vector<Color> colors_list;
extern const std::map<Color, std::string> color_map;
extern const std::map<Color, RenderColor> render_color_map;
inline constexpr int king_value = 13;
struct Card {
Card(Color col, int val);
const Color color;
const int value;
};
bool operator==(const Card &a, const Card &b) ;
bool operator!=(const Card &a, const Card &b) ;
bool operator<(const Card &a, const Card &b) ;
std::ostream& operator<< (std::ostream& os, const Card & card) ;
#endif