new 4475edb243ed4627f4c5f2c470ca40b3def034d4
[tagua/yd.git] / tests / movelist / main.cpp
blob17c98d2984a419af5630c4d4ae69f39d0220dd5d
1 #include <kapplication.h>
2 #include <kcmdlineargs.h>
3 #include "movelist_textual.h"
5 int main(int argc, char* argv[]) {
6 KCmdLineArgs::init(argc, argv, argv[0], 0, KLocalizedString(), NULL);
7 KApplication app;
9 MoveList::Textual w;
10 w.setMove(Index(1), 0, "e4");
11 w.setMove(Index(2), 1, "e5");
12 w.setComment(Index(2), "A good answer");
13 w.setMove(Index(2).next(0,1), 0, "Nf3");
14 w.setVComment(Index(2), 0, "Sadly, many people still play this move");
15 w.setComment(Index(2).next(0,1), "This move is much worse than f4");
16 w.setMove(Index(2).next(0,2), 1, "Nc6");
17 w.setMove(Index(2).next(0,3), 0, "Bb5");
18 w.setMove(Index(2).next(0,4), 1, "Nf6");
19 w.setMove(Index(2).next(0,3).next(0,1), 1, "f5");
20 w.setVComment(Index(2).next(0,3), 0, "Here is the confutation of Bb5");
21 w.setComment(Index(2).next(0,3).next(0,1), "White is hopeless");
22 w.setMove(Index(2).next(1,1), 0, "Nc3");
23 w.setVComment(Index(2), 1, "Another playable move");
24 w.setComment(Index(2).next(1,1), "Ok?");
25 w.setMove(Index(3), 0, "f4");
26 w.setMove(Index(4), 1, "Bc5");
27 w.select(Index(1));
28 w.select(Index(4));
29 //w.remove(Index(2).next(0,1));
30 w.show();
32 return app.exec();