Misc cleanups.
[tagua/yd.git] / src / gameinfo.h
blob63fc214422a8368aaf200fcaae3eb6103426d1dd
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
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.
9 */
11 #ifndef GAMEINFO_H
12 #define GAMEINFO_H
14 #include <qregexp.h>
15 #include "player.h"
16 #include "qstring.h"
18 class GameInfo {
19 Player m_white, m_black;
20 QString m_rated, m_type;
21 QString m_variant;
22 int m_time, m_increment;
23 int m_game_num;
25 public:
26 GameInfo(const Player& white, const Player& black,
27 const QString& rated, const QString& type,
28 int time, int increment);
30 GameInfo(QRegExp& pattern, int offset);
32 static QString variantCode(const QString& type);
33 const Player& white() const { return m_white; }
34 const Player& black() const { return m_black; }
35 QString rated() const { return m_rated; }
36 QString type() const { return m_type; }
37 int time() const { return m_time; }
38 int increment() const { return m_increment; }
39 int gameNumber() const { return m_game_num; }
40 void setGameNumber(int g) { m_game_num = g; }
41 QString variant() const { return m_variant; }
44 #endif // GAMEINFO_H