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
[] = "2.5.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"));
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 KCmdLineArgs::init(argc
, argv
, &about
);
56 KCmdLineOptions options
;
57 options
.add("Easy", ki18n("Start with Easy difficulty level"));
58 options
.add("Medium", ki18n("Start with Medium difficulty level"));
59 options
.add("Hard", ki18n("Start with Hard difficulty level"));
60 options
.add("VeryHard", ki18n("Start with Very Hard difficulty level"));
61 KCmdLineArgs::addCmdLineOptions(options
);
63 KApplication application
;
64 KGlobal::locale()->insertCatalog("libkdegames");
66 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
67 if (args
->isSet("Easy")) {
68 Settings::setSkill(Settings::EnumSkill::Easy
);
70 if (args
->isSet("Medium")) {
71 Settings::setSkill(Settings::EnumSkill::Medium
);
73 if (args
->isSet("Hard")) {
74 Settings::setSkill(Settings::EnumSkill::Hard
);
76 if (args
->isSet("VeryHard")) {
77 Settings::setSkill(Settings::EnumSkill::VeryHard
);
82 MainWindow
* window
= new MainWindow
;
85 return application
.exec();