-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,22 +1,26 @@ #include "backgammon.h" - #include "aidialog.h" #include "filedialog.h" #include "playerdialog.h" #include "rulesdialog.h" #include "themedialog.h" +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/qpeapplication.h> +#include <qpe/config.h> +#include <qpe/resource.h> +using namespace Opie::Core; + +/* QT */ #include <qfile.h> #include <qlayout.h> #include <qmessagebox.h> #include <qtimer.h> -#include <qpe/qpeapplication.h> -#include <qpe/config.h> #include <qmenubar.h> -#include <qpe/resource.h> #include <stdlib.h> BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) @@ -30,13 +34,13 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) move=new MoveEngine(); //load the default theme Config conf("backgammon"); if(!conf.isValid()) { - qDebug("config file does not exist"); + odebug << "config file does not exist" << oendl; conf.setGroup("general"); conf.writeEntry("theme","default"); conf.setGroup("rules"); conf.writeEntry("move_with_pieces_out",false); conf.writeEntry("nice_dice",false); conf.setGroup("display"); @@ -75,13 +79,13 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) //get the theme component names Config theme(theme_file,Config::File); if(!theme.isValid()) { - qDebug("theme file does not exist"); + odebug << "theme file does not exist" << oendl; theme.setGroup("theme"); theme.writeEntry("board","casino_board_1"); theme.writeEntry("pieces1","casino_pieces_blue"); theme.writeEntry("pieces2","casino_pieces_white"); theme.writeEntry("dice1","casino_dice"); theme.writeEntry("dice2","casino_dice"); 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 @@ -454,13 +454,13 @@ int MoveEngine::getPossibleMoves() } return total; } void MoveEngine::move(const int& from, int to, const int& dice) { - //qDebug("%d moves from %d to %d (%d) with dice %d",player,from,to,to-from,dice); + //odebug << "" << player << " moves from " << from << " to " << to << " (" << to-from << ") with dice " << dice << "" << oendl; if(player==1 && to==25) to=26; if(player==2 && to==0) to=27; |