SpaceInvaders  1.0
Ebauche d'une réalisation d'un space invader
MyConst_ML.h
1 #pragma once
2 #include "MyType_ML.h"
3 namespace nsSpaceInvaderML
4 {
8  const char KEmpty = ' ';
12  const char KInsideInvader = 'W';
16  const char KInsideMe = 'A';
20  const char KTorpedo = '|'; // For me
24  const char KMissile = 'T'; // For Invaders
25 
26  // caractères correspondants aux saisies
30  const char KRight = '6';
34  const char KLeft = '4';
38  const char KShoot = '5';
39 
40  // diverses tailles
44  const Size_t KInvadersSize = 4;
48  const Size_t KInvadersMiddle = KInvadersSize / 2;
52  const Size_t KMySize = 1;
56  const Size_t KMyMiddle = KMySize / 2;
60  const Size_t KSizeLine = 10;
64  const Size_t KSizeSpace = 10;
68  const Size_t KBegInvader = 0;
72  const Size_t KBegMe = KSizeLine / 2;
73 
77  const unsigned KRatioMeInvaders = 4;
78 
82  const std::string KEmptyLine (KSizeLine, KEmpty);
83 
87  const std::string KInvadersForm (KInvadersSize, KInsideInvader);
91  const std::string KMyForm (KMySize, KInsideMe);
92 
93  //Constantes de couleur
97  const std::string KReset ("0");
98 
102  const std::string KBlack ("30");
106  const std::string KRed ("31");
107 
111  const std::string KGreen ("32");
112 
116  const std::string KYellow ("33");
117 
121  const std::string KBlue ("34");
122 
126  const std::string KMAgenta ("35");
127 
131  const std::string KCyan ("36");
132 
133 }
const unsigned KMySize
Nombre de caractères qui forment mon vaisseau.
Definition: MyConst_AC.h:115
Definition: MyConst_ML.h:3
const char KEmpty
Alias vers une case vide à l'écran.
Definition: MyConst_AC.h:128
const std::string KEmptyLine(KSizeLine, KEmpty)
Alias vers une ligne vide de l'esapce.
const char KTorpedo
Caractèrere formant ma torpille.
Definition: MyConst_AC.h:110
const unsigned KSizeSpace
Nombre de colonnes de l'écran (de l'espace).
Definition: MyConst_AC.h:137
const std::string KMAgenta("35")
Alias mettant en mangenta la couleur du texte du terminal.
const unsigned KRatioMeInvaders
Nombre de fois où c'est le tour du joueur pour un tour de l'envahisseur.
Definition: MyConst_AC.h:121
const unsigned KBegMe
Numéro de colonne où commence le joueur.
Definition: MyConst_AC.h:147
const char KInsideMe
Caractèrere formant mon vaisseau.
Definition: MyConst_AC.h:105
const char KInsideInvader
Caractèrere formant l'envahisseur.
Definition: MyConst_AC.h:79
const unsigned KSizeLine
Nombre de lignes de l'écran (de l'espace).
Definition: MyConst_AC.h:132
const std::string KReset("0")
Alias remetant la couleur du texte du terminal à sa valeur par défaut.
const char KShoot
Alias vers la touche servant à lancer une torpille.
Definition: MyConst_AC.h:68
const char KMissile
Caractèrere formant le missile.
Definition: MyConst_AC.h:84
const unsigned KInvadersSize
Nombre de caractères qui forment l'envahisseur.
Definition: MyConst_AC.h:89
const char KLeft
Alias vers la touche servant à se déplacer à gauche.
Definition: MyConst_AC.h:63
const char KRight
Alias vers la touche servant à se déplacer à droite.
Definition: MyConst_AC.h:58
const unsigned KBegInvader
Numéro de colonne où commence l'envahisseur.
Definition: MyConst_AC.h:142
const std::string KCyan("36")
Alias mettant en cyan la couleur du texte du terminal.