1/***************************************************************************
2* KBlocks, a falling blocks game for KDE *
3* Copyright (C) 2010 Zhongjie Cai <squall.leonhart.cai@gmail.com> *
4* *
5* This program is free software; you can redistribute it and/or modify *
6* it under the terms of the GNU General Public License as published by *
7* the Free Software Foundation; either version 2 of the License, or *
8* (at your option) any later version. *
9***************************************************************************/
10#ifndef PIECE_INTERFACE
11#define PIECE_INTERFACE
12
13class PieceInterface
14{
15 public:
16 PieceInterface(){};
17 virtual ~PieceInterface(){};
18
19 public:
20 virtual int toValue() = 0;
21
22 virtual int getType() = 0;
23 virtual int getPosX() = 0;
24 virtual int getPosY() = 0;
25 virtual int getRotation() = 0;
26
27 virtual int getCellCount() = 0;
28 virtual int getRotationCount() = 0;
29 virtual int getCellPosX(int index) = 0;
30 virtual int getCellPosY(int index) = 0;
31
32 protected:
33 int mType;
34 int mPosX;
35 int mPosY;
36 int mRotation;
37};
38
39#endif //PIECE_INTERFACE
40