2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
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.
15 #include "piecetype.h"
16 #include "moveserializer.h"
38 PieceType promotionType
;
40 Type
type() const { return m_type
; }
41 void setType(Type value
) { m_type
= value
; }
43 QString
promotionSymbol() const;
45 ChessMove(Point from
, Point to
, PieceType promotionType
= INVALID_TYPE
);
48 static ChessMove
invalid() { return ChessMove(Point::invalid(), Point::invalid()); }
49 inline bool valid() const { return from
!= Point::invalid() && to
!= Point::invalid(); }
50 QString
toString(int xsize
, int ysize
) const;
51 bool operator==(const ChessMove
& other
) const;
52 bool operator!=(const ChessMove
& other
) const;
54 static ChessMove
createDropMove(int pool
, int piece_index
, const Point
&);