2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 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.
18 #include <core/point.h>
22 class TAGUA_EXPORT SAN
{
23 friend QDebug
operator<<(QDebug os
, const SAN
& move
);
25 static QRegExp pattern
;
26 static QRegExp kingCastlingPattern
;
27 static QRegExp queenCastlingPattern
;
28 static QRegExp nonePattern
;
39 static const IType
* getType(const QString
& letter
);
41 void load(const QString
&, int& offset
, int ysize
);
42 void load(const QString
&, int ysize
);
46 const IType
* promotion
;
47 CastlingType castling
;
50 inline bool invalid() const { return (dst
== Point::invalid()) && (castling
== NoCastling
); }
51 inline bool valid() const { return !invalid(); }
54 #endif // CHESS__SAN_H