Cute Chess 0.1
enginebuilder.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 ENGINEBUILDER_H
20#define ENGINEBUILDER_H
21
22#include "playerbuilder.h"
23#include <QCoreApplication>
24#include "engineconfiguration.h"
25
26
28class LIB_EXPORT EngineBuilder : public PlayerBuilder
29{
30 Q_DECLARE_TR_FUNCTIONS(EngineBuilder)
31
32 public:
35
36 // Inherited from PlayerBuilder
37 virtual bool isHuman() const;
38 virtual ChessPlayer* create(QObject* receiver,
39 const char* method,
40 QObject* parent,
41 QString* error) const;
42
43 private:
44 void setError(QString* error, const QString& message) const;
45
46 EngineConfiguration m_config;
47};
48
49#endif // ENGINEBUILDER_H
A chess player, human or AI.
Definition chessplayer.h:39
EngineBuilder(const EngineConfiguration &config)
Definition enginebuilder.cpp:25
The EngineConfiguration class defines a chess engine configuration.
Definition engineconfiguration.h:34
PlayerBuilder(const QString &name)
Definition playerbuilder.cpp:21
virtual ChessPlayer * create(QObject *receiver, const char *method, QObject *parent, QString *error) const =0
virtual bool isHuman() const =0