-rw-r--r-- | noncore/games/backgammon/backgammon.cpp | 16 | ||||
-rw-r--r-- | noncore/games/backgammon/moveengine.cpp | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp index 51020a0..bdb1c78 100644 --- a/noncore/games/backgammon/backgammon.cpp +++ b/noncore/games/backgammon/backgammon.cpp | |||
@@ -1,20 +1,24 @@ | |||
1 | #include "backgammon.h" | 1 | #include "backgammon.h" |
2 | |||
3 | #include "aidialog.h" | 2 | #include "aidialog.h" |
4 | #include "filedialog.h" | 3 | #include "filedialog.h" |
5 | #include "playerdialog.h" | 4 | #include "playerdialog.h" |
6 | #include "rulesdialog.h" | 5 | #include "rulesdialog.h" |
7 | #include "themedialog.h" | 6 | #include "themedialog.h" |
8 | 7 | ||
8 | /* OPIE */ | ||
9 | #include <opie2/odebug.h> | ||
10 | #include <qpe/qpeapplication.h> | ||
11 | #include <qpe/config.h> | ||
12 | #include <qpe/resource.h> | ||
13 | using namespace Opie::Core; | ||
14 | |||
15 | /* QT */ | ||
9 | #include <qfile.h> | 16 | #include <qfile.h> |
10 | #include <qlayout.h> | 17 | #include <qlayout.h> |
11 | #include <qmessagebox.h> | 18 | #include <qmessagebox.h> |
12 | #include <qtimer.h> | 19 | #include <qtimer.h> |
13 | #include <qpe/qpeapplication.h> | ||
14 | #include <qpe/config.h> | ||
15 | #include <qmenubar.h> | 20 | #include <qmenubar.h> |
16 | #include <qpe/resource.h> | ||
17 | 21 | ||
18 | #include <stdlib.h> | 22 | #include <stdlib.h> |
19 | 23 | ||
20 | 24 | ||
@@ -32,9 +36,9 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) | |||
32 | //load the default theme | 36 | //load the default theme |
33 | Config conf("backgammon"); | 37 | Config conf("backgammon"); |
34 | if(!conf.isValid()) | 38 | if(!conf.isValid()) |
35 | { | 39 | { |
36 | qDebug("config file does not exist"); | 40 | odebug << "config file does not exist" << oendl; |
37 | conf.setGroup("general"); | 41 | conf.setGroup("general"); |
38 | conf.writeEntry("theme","default"); | 42 | conf.writeEntry("theme","default"); |
39 | conf.setGroup("rules"); | 43 | conf.setGroup("rules"); |
40 | conf.writeEntry("move_with_pieces_out",false); | 44 | conf.writeEntry("move_with_pieces_out",false); |
@@ -77,9 +81,9 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) | |||
77 | //get the theme component names | 81 | //get the theme component names |
78 | Config theme(theme_file,Config::File); | 82 | Config theme(theme_file,Config::File); |
79 | if(!theme.isValid()) | 83 | if(!theme.isValid()) |
80 | { | 84 | { |
81 | qDebug("theme file does not exist"); | 85 | odebug << "theme file does not exist" << oendl; |
82 | theme.setGroup("theme"); | 86 | theme.setGroup("theme"); |
83 | theme.writeEntry("board","casino_board_1"); | 87 | theme.writeEntry("board","casino_board_1"); |
84 | theme.writeEntry("pieces1","casino_pieces_blue"); | 88 | theme.writeEntry("pieces1","casino_pieces_blue"); |
85 | theme.writeEntry("pieces2","casino_pieces_white"); | 89 | theme.writeEntry("pieces2","casino_pieces_white"); |
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp index 7de7147..a4145cc 100644 --- a/noncore/games/backgammon/moveengine.cpp +++ b/noncore/games/backgammon/moveengine.cpp | |||
@@ -456,9 +456,9 @@ int MoveEngine::getPossibleMoves() | |||
456 | } | 456 | } |
457 | 457 | ||
458 | void MoveEngine::move(const int& from, int to, const int& dice) | 458 | void MoveEngine::move(const int& from, int to, const int& dice) |
459 | { | 459 | { |
460 | //qDebug("%d moves from %d to %d (%d) with dice %d",player,from,to,to-from,dice); | 460 | //odebug << "" << player << " moves from " << from << " to " << to << " (" << to-from << ") with dice " << dice << "" << oendl; |
461 | 461 | ||
462 | if(player==1 && to==25) | 462 | if(player==1 && to==25) |
463 | to=26; | 463 | to=26; |
464 | if(player==2 && to==0) | 464 | if(player==2 && to==0) |