2 Copyright 2005 Thomas Nagy <tnagyemail-mail@yahoo.fr>
3 Copyright 2007-2008 Fela Winkelmolen <fela.kde@gmail.com>
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.
10 This program 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.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include <KApplication>
21 #include <KCmdLineArgs>
28 #include "mainwindow.h"
30 static const char description
[] =
31 I18N_NOOP("KNetWalk, a game for system administrators.");
33 static const char version
[] = "3.0.0";
35 int main(int argc
, char ** argv
)
37 KAboutData
about("knetwalk", 0, ki18n("KNetWalk"), version
,
38 ki18n(description
), KAboutData::License_GPL
,
39 ki18n("(C) 2004-2005 Andi Peredri, ported to KDE by Thomas Nagy\n"
40 "(C) 2007-2008 Fela Winkelmolen"), KLocalizedString(), "http://games.kde.org/knetwalk" );
42 about
.addAuthor(ki18n("Fela Winkelmolen"),
43 ki18n("current maintainer"),
44 "fela.kde@gmail.com");
46 about
.addAuthor(ki18n("Andi Peredri"),
47 ki18n("original author"),
50 about
.addAuthor(ki18n("Thomas Nagy"),
54 about
.addCredit(ki18n("Eugene Trounev"),
56 "eugene.trounev@gmail.com");
58 KCmdLineArgs::init(argc
, argv
, &about
);
60 KCmdLineOptions options
;
61 options
.add("Easy", ki18n("Start with Easy difficulty level"));
62 options
.add("Medium", ki18n("Start with Medium difficulty level"));
63 options
.add("Hard", ki18n("Start with Hard difficulty level"));
64 options
.add("VeryHard", ki18n("Start with Very Hard difficulty level"));
65 KCmdLineArgs::addCmdLineOptions(options
);
67 KApplication application
;
68 KGlobal::locale()->insertCatalog("libkdegames");
70 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
71 if (args
->isSet("Easy")) {
72 Settings::setSkill(Settings::EnumSkill::Easy
);
74 if (args
->isSet("Medium")) {
75 Settings::setSkill(Settings::EnumSkill::Medium
);
77 if (args
->isSet("Hard")) {
78 Settings::setSkill(Settings::EnumSkill::Hard
);
80 if (args
->isSet("VeryHard")) {
81 Settings::setSkill(Settings::EnumSkill::VeryHard
);
86 MainWindow
* window
= new MainWindow
;
89 return application
.exec();