2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 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.
11 #include <core/defaultpolicy.h>
12 #include <core/repository.h>
13 #include <core/variant.h>
18 #include "statefactory.h"
19 #include "validator.h"
21 using namespace Chess
;
23 KDE_EXPORT Variant
* chess_variant_factory() {
24 Variant
* v
= new Variant("Chess");
25 Repository
* repo
= v
->repository();
27 repo
->addComponent("player/0", White::self());
28 repo
->addComponent("player/1", Black::self());
30 repo
->addComponent("type/king", King::self());
31 repo
->addComponent("type/queen", Queen::self());
32 repo
->addComponent("type/rook", Rook::self());
33 repo
->addComponent("type/bishop", Bishop::self());
34 repo
->addComponent("type/knight", Knight::self());
35 repo
->addComponent("type/pawn", Pawn::self());
37 repo
->addComponent("state_factory", new StateFactory(Point(8, 8)));
38 repo
->addComponent("validator", new Validator
);
39 repo
->addComponent("animator_factory", new AnimatorFactory
);
40 repo
->addComponent("namer", new Namer
);
41 repo
->addComponent("policy", new DefaultPolicy
);