Ported verbose deserialization.
[tagua/yd.git] / src / hlvariant / chess / icsverbose.h
blobf25cd5f526ec1dc2eb4ed290b49aebeab133b3fe
1 /*
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.
9 */
11 #ifndef HLVARIANT__CHESS__ICSVERBOSE_H
12 #define HLVARIANT__CHESS__ICSVERBOSE_H
14 #include "san.h"
16 namespace HLVariant {
17 namespace Chess {
19 class ICSVerbose {
20 static QRegExp pattern;
21 static QRegExp kingCastlingPattern;
22 static QRegExp queenCastlingPattern;
23 static QRegExp nonePattern;
25 public:
26 ICSVerbose();
27 void load(const QString&, int ysize);
29 Point from, to;
30 int type, promotion;
31 SAN::CastlingType castling;
33 inline bool invalid() const { return (from == Point::invalid() && to == Point::invalid()); }
34 inline bool valid() const { return !invalid(); }
38 } // namespace Chess
39 } // namespace HLVariant
41 #endif // HLVARIANT__CHESS__ICSVERBOSE_H