Cute Chess  0.1
sittuyinboard.h
1 /*
2  This file is part of Cute Chess.
3  Copyright (C) 2008-2018 Cute Chess authors
4 
5  Cute Chess 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 3 of the License, or
8  (at your option) any later version.
9 
10  Cute Chess is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef SITTUYINBOARD_H
20 #define SITTUYINBOARD_H
21 
22 #include "makrukboard.h"
23 
24 namespace Chess {
25 
72 class LIB_EXPORT SittuyinBoard : public MakrukBoard
73 {
74  public:
76  SittuyinBoard();
77 
78  // Inherited from MakrukBoard
79  virtual Board* copy() const;
80  virtual QString variant() const;
81  virtual QString defaultFenString() const;
82  virtual bool variantHasDrops() const;
83  virtual bool variantHasOptionalPromotions() const;
84 
85  protected:
88  {
89  Pawn = 1,
91  Elephant = Bishop,
92  Rook,
93  General = Queen,
94  King
95  };
96 
97  // Inherited from MakrukBoard
98  virtual QList< Piece > reservePieceTypes() const;
99  virtual bool kingsCountAssertion(int whiteKings, int blackKings) const;
100  virtual void generatePawnMoves(int sourceSquare,
101  QVarLengthArray<Move>& moves) const;
102  virtual void generateMovesForPiece(QVarLengthArray<Move>& moves,
103  int pieceType,
104  int square) const;
105  virtual void addPromotions(int sourceSquare,
106  int targetSquare,
107  QVarLengthArray< Move >& moves) const;
108  virtual bool vSetFenString(const QStringList& fen);
109  virtual void vMakeMove(const Move& move,
110  BoardTransition* transition);
111  virtual void vUndoMove(const Move& move);
112  virtual int promotionRank(int file = 0) const;
113  virtual bool vIsLegalMove(const Move& move);
114  virtual bool isLegalPosition();
115  virtual int countingLimit() const;
116  virtual CountingRules countingRules() const;
117  virtual Result result();
118 
119  private:
120  bool m_inSetUp;
121  bool inSetup() const;
122 };
123 
124 } // namespace Chess
125 #endif // SITTUYINBOARD_H
A board for Sit-tu-yin (Myanmar Traditional Chess, Burmese Chess)
Definition: sittuyinboard.h:72
An internal chessboard class.
Definition: board.h:57
Yahhta: Chariot.
Definition: sittuyinboard.h:92
Definition: boardscene.h:29
Myin: Horse.
Definition: sittuyinboard.h:90
A board for Makruk (Thai Chess)
Definition: makrukboard.h:78
The result of a chess game.
Definition: result.h:34
Details of a board transition caused by a move.
Definition: boardtransition.h:40
SittuyinPieceType
Definition: sittuyinboard.h:87
A small and efficient chessmove class.
Definition: move.h:42
CountingRules
Definition: makrukboard.h:130