-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshape.h
87 lines (64 loc) · 1.52 KB
/
shape.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef SHAPE_H
#define SHAPE_H
#include <QObject>
#include <QTimer>
class Shape : public QObject
{
Q_OBJECT
public:
explicit Shape(QObject *parent = 0 );
~Shape();
//public values
int pos[2];
int direction;
bool isStillRunning;
int type;
QTimer *timer;
int blocks[3][3] = {};
int tempArray[3][3] ={};
int color;
int checkRowToDelete;//for chacking if row is full delete it
// enums *************************************************************************************
enum colortype {
white,
red,
reds,
green,
greens,
blue,
blues,
yellow,
yellows
};
enum directiontype{
left,
right,
up,
down
};
enum typetype{
lShape,
nShape,
squareShape,
pyrmidShape,
linerShape,
plusShape
};
//fill blocks arry
void fillBlocks();
//change color of blocks at the end
void Sblocks();
//map blocks from blocks to board array
void mapBlocksToBoard();
public slots:
//oebit slot ***************************************************************************
void orbit();
//move slots *************************************************************************
void moveDown();
void moveLeft();
void moveRight();
void doSoon() ;
//position slots **********************************************************************
void setPos(int valuex, int valuey);
};
#endif // SHAPE_H