catch me if you can  0.1
type.h
Go to the documentation of this file.
1 #ifndef TYPE_H
2 #define TYPE_H
3 
12 #include <string>
13 #include <vector>
14 #include <map>
15 
19 typedef std::vector <char> CVLine;
20 
25 typedef std::vector <CVLine> CMat;
26 
30 typedef std::pair <unsigned, unsigned> CPosition;
31 
32 
33 
37 struct AuthorizedKey {
39  const std::vector <std::string> VParamChar {"KeyUp", "KeyDown", "KeyLeft", "KeyRight", "TokenP1", "TokenP2"};
41  const std::vector <std::string> VParamString {"ColorP1", "ColorP2"};
43  const std::vector <std::string> VParamUnsigned {"NbRow", "NbColumn"};
44 };
45 
50 
55 const std::map <std::string, std::string> KColor
56 {
57  {"KReset", "0"},
58  {"KBlack", "30"},
59  {"KRed", "31"},
60  {"KGreen", "32"},
61  {"KYellow", "33"},
62  {"KBlue", "34"},
63  {"KMAgenta", "35"},
64  {"KCyan", "36"},
65 
66 };
67 
71 const char KEmpty = ' ';
72 
73 #endif // TYPE_H
const char KEmpty
KEmpty : character for an empty cell.
Definition: type.h:71
Struct containing all the authorized keys in the struct CMyParam.
Definition: type.h:37
std::vector< char > CVLine
CVLine : alias to a line of the matrix.
Definition: type.h:19
const std::vector< std::string > VParamUnsigned
Definition: type.h:43
std::pair< unsigned, unsigned > CPosition
CPosition : a pair gathering the coordinates in the grid.
Definition: type.h:30
const std::vector< std::string > VParamChar
Definition: type.h:39
std::vector< CVLine > CMat
CMat : alias to a game grid type.
Definition: type.h:25
const std::map< std::string, std::string > KColor
KColor : map between the "human" color and its correspondence for the Unix terminal.
Definition: type.h:56
const AuthorizedKey KAuthorizedKey
KAuthorizedKey.
Definition: type.h:49
const std::vector< std::string > VParamString
Definition: type.h:41