-rw-r--r-- | noncore/games/oyatzee/oyatzee.cpp | 50 | ||||
-rw-r--r-- | noncore/games/oyatzee/oyatzee.pro | 2 |
2 files changed, 29 insertions, 23 deletions
diff --git a/noncore/games/oyatzee/oyatzee.cpp b/noncore/games/oyatzee/oyatzee.cpp index a55aa73..27c0a9f 100644 --- a/noncore/games/oyatzee/oyatzee.cpp +++ b/noncore/games/oyatzee/oyatzee.cpp @@ -1,11 +1,17 @@ #include "oyatzee.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qmessagebox.h> #include <qpushbutton.h> #include <qpainter.h> #include <qlayout.h> +/* STD */ #include <stdlib.h> OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( parent , name , fl ) { @@ -40,9 +46,9 @@ OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( } void OYatzee::slotEndRound( int item ) { - qDebug( "Der User hat Nummer %d ausgewählt" , item ); + odebug << "Der User hat Nummer " << item << " ausgewählt" << oendl; /* * if the user clicked on Total, Bonus or Score and thus not on a * selectable item return and do nothing @@ -108,9 +114,9 @@ void OYatzee::slotEndRound( int item ) sb->nextRB(currentPlayer-1)->updateMap( item , points ); nextPlayer(); - qDebug( "Punkte: %d" , points ); + odebug << "Punkte: " << points << "" << oendl; } void OYatzee::nextPlayer() { @@ -155,9 +161,9 @@ OYatzee::~OYatzee() void OYatzee::detectPosibilities() { posibilities.clear(); - qDebug( "running detectPosibilities()" ); + odebug << "running detectPosibilities()" << oendl; Dice *d = dw->diceList.first(); QValueListInt numbers; @@ -260,49 +266,49 @@ void OYatzee::detectPosibilities() void OYatzee::displayPossibilites() { //X for ( QValueListInt::Iterator it = posibilities.begin() ; it != posibilities.end(); ++it ) //X { -//X qDebug( QString::number( *it ) ); +//X odebug << QString::number( *it ) << oendl; //X switch ( *it ) //X { //X case Ones: -//X qDebug( "1er" ); +//X odebug << "1er" << oendl; //X break; //X case Twos: -//X qDebug( "2er" ); +//X odebug << "2er" << oendl; //X break; //X case Threes: -//X qDebug( "3er" ); +//X odebug << "3er" << oendl; //X break; //X case Fours: -//X qDebug( "4er" ); +//X odebug << "4er" << oendl; //X break; //X case Fives: -//X qDebug( "5er" ); +//X odebug << "5er" << oendl; //X break; //X case Sixes: -//X qDebug( "6er" ); +//X odebug << "6er" << oendl; //X break; //X case ThreeOfAKind: -//X qDebug( "3oaK" ); +//X odebug << "3oaK" << oendl; //X break; //X case FourOfAKind: -//X qDebug( "4oaK" ); +//X odebug << "4oaK" << oendl; //X break; //X case FullHouse: -//X qDebug( "Full House" ); +//X odebug << "Full House" << oendl; //X break; //X case SStraight: -//X qDebug( "Short S" ); +//X odebug << "Short S" << oendl; //X break; //X case LStraight: -//X qDebug( "Long S" ); +//X odebug << "Long S" << oendl; //X break; //X case Yatzee: -//X qDebug( "Yatzee!" ); +//X odebug << "Yatzee!" << oendl; //X break; //X case Chance: -//X qDebug( "Chance" ); +//X odebug << "Chance" << oendl; //X break; //X } //X } @@ -334,9 +340,9 @@ void OYatzee::slotStartGame() } void OYatzee::slotRollDices() { - qDebug( "Roll nummer: %d" , ps.at( currentPlayer-1 )->turn ); + odebug << "Roll nummer: " << ps.at( currentPlayer-1 )->turn << "" << oendl; if ( ps.at( currentPlayer-1 )->turn == 3 ) { QMessageBox::information( this, @@ -352,11 +358,11 @@ void OYatzee::slotRollDices() if ( !d->isSelected ) d->roll(); } -// qDebug( "Roll nummer (vorher): %d" , ps.at( currentPlayer-1 )->turn ); +// odebug << "Roll nummer (vorher): " << ps.at( currentPlayer-1 )->turn << "" << oendl; ps.at(currentPlayer-1)->turn++; -// qDebug( "Roll nummer (nachher): %d" , ps.at( currentPlayer-1 )->turn ); +// odebug << "Roll nummer (nachher): " << ps.at( currentPlayer-1 )->turn << "" << oendl; detectPosibilities(); } @@ -390,9 +396,9 @@ Resultboard* Scoreboard::nextRB( int currentPlayer ) Resultboard *b; b = rbList.at( currentPlayer ); - qDebug( "Anzahl: %d" , rbList.count() ); + odebug << "Anzahl: " << rbList.count() << "" << oendl; return b; } @@ -607,9 +613,9 @@ void Resultboard::paintEvent( QPaintEvent* ) pointMap::Iterator it = pMap.begin(); for ( ; it != pMap.end() ; ++it ) { int i = it.key(); - qDebug( "ok: %d , %d" , i , it.data() ); + odebug << "ok: " << i << " , " << it.data() << "" << oendl; p.drawText( 0, i*cell_height , cell_width , cell_height , Qt::AlignCenter , QString::number( it.data() ) ); } p.drawText( 0,0,cell_width,cell_height, Qt::AlignCenter , pName ); //Playername diff --git a/noncore/games/oyatzee/oyatzee.pro b/noncore/games/oyatzee/oyatzee.pro index 754abd2..f505c66 100644 --- a/noncore/games/oyatzee/oyatzee.pro +++ b/noncore/games/oyatzee/oyatzee.pro @@ -5,7 +5,7 @@ HEADERS = oyatzee.h SOURCES = main.cpp oyatzee.cpp TARGET = oyatzee INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 include ( $(OPIEDIR)/include.pro ) |