summaryrefslogtreecommitdiffstats
path: root/libksirtet/common/factory.cpp
blob: a93e6fe5b1fc31b8450ae13179ca0a1cfc1d77b8 (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)
{}

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

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

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