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.
17 #include <boost/shared_ptr.hpp>
18 #include "controllers/entitytoken.h"
26 struct EngineDetails
{
41 EngineDetails(const QString
& name
, const QString
& path
, const EngineType
& type
)
42 : name(name
), path(path
), type(type
) { }
45 static QString
typeName(EngineType t
) {
62 static EngineType
typeFromName(const QString
& name
) {
65 else if (name
== "UCI")
67 else if (name
== "tagua-text")
69 else if (name
== "tagua-dbus")
71 else if (name
== "gnushogi")
76 void load(Settings s
);
77 void save(Settings s
);
80 class EngineInfo
: public QObject
{
82 EngineDetails m_details
;
84 typedef std::map
<const IColor
*, EntityToken
> Tokens
;
87 virtual boost::shared_ptr
<Engine
> engine(Components
* components
, int player
);
88 void playAs(Components
* components
, const IColor
* player
);
90 EngineInfo(const EngineDetails
& details
, UI
& ui
);
91 void setWorkPath(const QString
& wp
) { m_details
.workPath
= wp
; }
94 #endif // ENGINEINFO_H