SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
invadersGrid.h
Go to the documentation of this file.
1
12#ifndef GUARD_INVADERSGRID_H
13#define GUARD_INVADERSGRID_H
14
15#include<vector>
16
17using namespace std;
18
22enum class InvaderType {
23 TYPEA,
24 TYPEB,
25 TYPEC,
26 NONE,
27};
28
33class InvadersColumn : public vector<InvaderType>{
34public:
35 // idk why CLion says this is not implemented, but it is
36
42 bool hasNoValid() const;
43
49 unsigned getOutterInvader() const;
50
56 unsigned randomValidInv() const;
57}; // class InvadersColumn
58
59
64class InvadersGrid : public vector<InvadersColumn>{
65public:
66
73 unsigned validColsNumber() const;
74 unsigned randomValidCol() const;
75};
76
77#endif
Column of invader.
Definition: invadersGrid.h:33
unsigned randomValidInv() const
unsigned getOutterInvader() const
gives the index of the last valid (type different than NONE) invader
bool hasNoValid() const
tells if the column contains no non type NONE invader
unsigned randomValidCol() const
unsigned validColsNumber() const
InvaderType
List of all invader type.
Definition: invadersGrid.h:22