summaryrefslogtreecommitdiffstats
path: root/libksirtet/common/factory.cpp
blob: 1b239a82294aafe22d944d07ea96ef91f0fcc980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "factory.h"

#include "ai.h"
#include "settings.h"


CommonFactory::CommonFactory(const MainData &md, const BaseBoardInfo &bbi,
                             const CommonBoardInfo &ci)
    : BaseFactory(md, bbi), cbi(ci)
{}

QWidget *CommonFactory::createAppearanceConfig()
{
    return new AppearanceConfig;
}

QWidget *CommonFactory::createGameConfig()
{
    return new GameConfig;
}

QWidget *CommonFactory::createAIConfig()
{
    AI *ai = createAI();
    QWidget *cw = new AIConfig(ai->elements());
    delete ai;
    return cw;
}