Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FIGURE_H
- #define FIGURE_H
- #include <QObject>
- class Figure : public QObject {
- Q_OBJECT
- public:
- enum Type { King, Queen, Rook, Bishop, Knight };
- explicit Figure(int x, int y, Type type, QObject *parent = 0);
- inline int getX() const { return m_x; }
- inline int getY() const { return m_y; }
- Figure::Type type();
- QString nameByType() const;
- QString nameByType(Type type) const;
- QString coordinates() const;
- signals:
- public slots:
- private:
- int m_x;
- int m_y;
- Type m_type;
- };
- #endif // FIGURE_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement