diff options
Diffstat (limited to 'piece.h')
| -rw-r--r-- | piece.h | 48 | 
1 files changed, 48 insertions, 0 deletions
| @@ -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 | 
