chessitem.h 367 B

123456789101112131415161718192021
  1. #ifndef CHESSITEM_H
  2. #define CHESSITEM_H
  3. #include<QPoint>
  4. class ChessItem
  5. {
  6. public:
  7. ChessItem(void);
  8. ChessItem(QPoint point,bool isBlack);
  9. bool operator==(const ChessItem &t1) const
  10. {
  11. return((_pt == t1._pt) && (_black ==t1._black));
  12. }
  13. //棋子的位置
  14. QPoint _pt;
  15. //棋子的颜色
  16. bool _black;
  17. };
  18. #endif // CHESSITEM_H