summaryrefslogtreecommitdiffstats
path: root/piece.h
diff options
context:
space:
mode:
Diffstat (limited to 'piece.h')
-rw-r--r--piece.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/piece.h b/piece.h
new file mode 100644
index 0000000..52c2a5b
--- /dev/null
+++ b/piece.h
@@ -0,0 +1,48 @@
+#ifndef _PIECE_H_
+#define _PIECE_H_
+
+#include <cstdio>
+#include <iostream>
+#include <string>
+#include <vector>
+
+using std::string;
+using std::cout;
+using std::endl;
+using std::vector;
+
+typedef struct
+{
+ int row;
+ int col;
+} POINT;
+
+class Piece
+{
+ private:
+ string name;
+ int row;
+ int col;
+ int w;
+ int h;
+ char dir;
+ vector<POINT> haveBeen;
+
+ public:
+ Piece(void);
+ Piece(string, int = 0, int = 0, int = 0, int = 0, char = 0);
+
+ string getName(void);
+ int getRow(void);
+ int getCol(void);
+ int getW(void);
+ int getH(void);
+ char getDir(void);
+ void markPos(void);
+ vector<POINT> *gethaveBeen(void);
+
+ void setRow(int);
+ void setCol(int);
+};
+
+#endif