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
24namespace Chess {
25
72class LIB_EXPORT SittuyinBoard : public MakrukBoard
73{
74 public:
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
84 protected:
87 {
88 Pawn = 1,
90 Elephant = Bishop,
92 General = Queen,
93 King
94 };
95
96 // Inherited from MakrukBoard
97 virtual QList< Piece > reservePieceTypes() const;
98 virtual bool kingsCountAssertion(int whiteKings, int blackKings) const;
99 virtual void generatePawnMoves(int sourceSquare,
100 QVarLengthArray<Move>& moves) const;
101 virtual void generateMovesForPiece(QVarLengthArray<Move>& moves,
102 int pieceType,
103 int square) const;
104 virtual void addPromotions(int sourceSquare,
105 int targetSquare,
106 QVarLengthArray< Move >& moves) const;
107 virtual bool vSetFenString(const QStringList& fen);
108 virtual Move moveFromSanString(const QString & str);
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 initialPlyCount() const;
116 virtual int countingLimit() const;
117 virtual CountingRules countingRules() const;
118 virtual Result result();
119
120 private:
121 bool m_inSetUp;
122 bool inSetup() const;
123 bool canMakeNormalMove();
124};
125
126} // namespace Chess
127#endif // SITTUYINBOARD_H
Details of a board transition caused by a move.
Definition: boardtransition.h:41
An internal chessboard class.
Definition: board.h:58
A board for Makruk (Thai Chess)
Definition: makrukboard.h:79
A small and efficient chessmove class.
Definition: move.h:43
The result of a chess game.
Definition: result.h:35
A board for Sit-tu-yin (Myanmar Traditional Chess, Burmese Chess)
Definition: sittuyinboard.h:73
SittuyinPieceType
Definition: sittuyinboard.h:87
@ Knight
Myin: Horse.
Definition: sittuyinboard.h:89
@ Rook
Yahhta: Chariot.
Definition: sittuyinboard.h:91