author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/games/oyatzee/oyatzee.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/games/oyatzee/oyatzee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/oyatzee/oyatzee.cpp | 50 |
1 files changed, 28 insertions, 22 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,4 +1,9 @@ #include "oyatzee.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qmessagebox.h> #include <qpushbutton.h> @@ -6,4 +11,5 @@ #include <qlayout.h> +/* STD */ #include <stdlib.h> @@ -42,5 +48,5 @@ 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; /* @@ -110,5 +116,5 @@ void OYatzee::slotEndRound( int item ) nextPlayer(); - qDebug( "Punkte: %d" , points ); + odebug << "Punkte: " << points << "" << oendl; } @@ -157,5 +163,5 @@ void OYatzee::detectPosibilities() { posibilities.clear(); - qDebug( "running detectPosibilities()" ); + odebug << "running detectPosibilities()" << oendl; Dice *d = dw->diceList.first(); @@ -262,45 +268,45 @@ 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 } @@ -336,5 +342,5 @@ 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 ) @@ -354,7 +360,7 @@ void OYatzee::slotRollDices() } -// 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(); @@ -392,5 +398,5 @@ Resultboard* Scoreboard::nextRB( int currentPlayer ) b = rbList.at( currentPlayer ); - qDebug( "Anzahl: %d" , rbList.count() ); + odebug << "Anzahl: " << rbList.count() << "" << oendl; return b; @@ -609,5 +615,5 @@ void Resultboard::paintEvent( QPaintEvent* ) { 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() ) ); } |