-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpattern4.h
More file actions
46 lines (42 loc) · 948 Bytes
/
pattern4.h
File metadata and controls
46 lines (42 loc) · 948 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
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _PATTERN4_H_
#define _PATTERN4_H_
#include "wcpt2d.h"
#include "playarea.h"
#include "block.h"
class Pattern4
{
public:
Pattern4 ();
~Pattern4 ();
void EmptyMatrix ();
void Draw ();
void DrawAt (wcPt2D posXY);
void Copy (Pattern4 source);
void Rotate ();
void AlignTop ();
void CalcPosXY ();
int Width ();
int Height ();
void MoveLeft ();
void MoveRight ();
bool MoveDown ();
void RestoreOldPosition ();
bool Intersects ();
float getPositionInPlayAreaX ();
float getPositionInPlayAreaY ();
void setMatrix (int pos);
bool getMatrix (int pos);
void IncorporateInPlayArea ();
void SetPlayArea (PlayArea playArea);
void SetPositionInPlayArea (float x, float y);
PlayArea GetPlayArea ();
private:
Block TransparentBlock;
Block FilledBlock;
wcPt2D _posXY;
wcPt2D _positionInPlayArea;
wcPt2D _positionInPlayArea_old;
bool Matrix [4 * 4];
PlayArea _playArea;
};
#endif