Cute Chess  0.1
humanbuilder.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 HUMANBUILDER_H
20 #define HUMANBUILDER_H
21 
22 #include "playerbuilder.h"
23 #include <QString>
24 
25 
27 class LIB_EXPORT HumanBuilder : public PlayerBuilder
28 {
29  public:
37  HumanBuilder(const QString& playerName = QString(),
38  bool playAfterTimeout = true);
39 
40  // Inherited from PlayerBuilder
41  virtual bool isHuman() const;
42  virtual ChessPlayer* create(QObject* receiver,
43  const char* method,
44  QObject* parent,
45  QString* error) const;
46  private:
47  bool m_playAfterTimeout;
48 };
49 
50 #endif // HUMANBUILDER_H
A class for constructing new chess players.
Definition: playerbuilder.h:38
A chess player, human or AI.
Definition: chessplayer.h:38
virtual ChessPlayer * create(QObject *receiver, const char *method, QObject *parent, QString *error) const =0
A class for constructing human players.
Definition: humanbuilder.h:27
virtual bool isHuman() const =0