author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/games/oyatzee | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-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,4 +1,9 @@ | |||
1 | #include "oyatzee.h" | 1 | #include "oyatzee.h" |
2 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
6 | |||
7 | /* QT */ | ||
3 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
4 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
@@ -6,4 +11,5 @@ | |||
6 | #include <qlayout.h> | 11 | #include <qlayout.h> |
7 | 12 | ||
13 | /* STD */ | ||
8 | #include <stdlib.h> | 14 | #include <stdlib.h> |
9 | 15 | ||
@@ -42,5 +48,5 @@ OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( | |||
42 | void OYatzee::slotEndRound( int item ) | 48 | void OYatzee::slotEndRound( int item ) |
43 | { | 49 | { |
44 | qDebug( "Der User hat Nummer %d ausgewählt" , item ); | 50 | odebug << "Der User hat Nummer " << item << " ausgewählt" << oendl; |
45 | 51 | ||
46 | /* | 52 | /* |
@@ -110,5 +116,5 @@ void OYatzee::slotEndRound( int item ) | |||
110 | nextPlayer(); | 116 | nextPlayer(); |
111 | 117 | ||
112 | qDebug( "Punkte: %d" , points ); | 118 | odebug << "Punkte: " << points << "" << oendl; |
113 | } | 119 | } |
114 | 120 | ||
@@ -157,5 +163,5 @@ void OYatzee::detectPosibilities() | |||
157 | { | 163 | { |
158 | posibilities.clear(); | 164 | posibilities.clear(); |
159 | qDebug( "running detectPosibilities()" ); | 165 | odebug << "running detectPosibilities()" << oendl; |
160 | 166 | ||
161 | Dice *d = dw->diceList.first(); | 167 | Dice *d = dw->diceList.first(); |
@@ -262,45 +268,45 @@ void OYatzee::displayPossibilites() | |||
262 | //X for ( QValueListInt::Iterator it = posibilities.begin() ; it != posibilities.end(); ++it ) | 268 | //X for ( QValueListInt::Iterator it = posibilities.begin() ; it != posibilities.end(); ++it ) |
263 | //X { | 269 | //X { |
264 | //X qDebug( QString::number( *it ) ); | 270 | //X odebug << QString::number( *it ) << oendl; |
265 | //X switch ( *it ) | 271 | //X switch ( *it ) |
266 | //X { | 272 | //X { |
267 | //X case Ones: | 273 | //X case Ones: |
268 | //X qDebug( "1er" ); | 274 | //X odebug << "1er" << oendl; |
269 | //X break; | 275 | //X break; |
270 | //X case Twos: | 276 | //X case Twos: |
271 | //X qDebug( "2er" ); | 277 | //X odebug << "2er" << oendl; |
272 | //X break; | 278 | //X break; |
273 | //X case Threes: | 279 | //X case Threes: |
274 | //X qDebug( "3er" ); | 280 | //X odebug << "3er" << oendl; |
275 | //X break; | 281 | //X break; |
276 | //X case Fours: | 282 | //X case Fours: |
277 | //X qDebug( "4er" ); | 283 | //X odebug << "4er" << oendl; |
278 | //X break; | 284 | //X break; |
279 | //X case Fives: | 285 | //X case Fives: |
280 | //X qDebug( "5er" ); | 286 | //X odebug << "5er" << oendl; |
281 | //X break; | 287 | //X break; |
282 | //X case Sixes: | 288 | //X case Sixes: |
283 | //X qDebug( "6er" ); | 289 | //X odebug << "6er" << oendl; |
284 | //X break; | 290 | //X break; |
285 | //X case ThreeOfAKind: | 291 | //X case ThreeOfAKind: |
286 | //X qDebug( "3oaK" ); | 292 | //X odebug << "3oaK" << oendl; |
287 | //X break; | 293 | //X break; |
288 | //X case FourOfAKind: | 294 | //X case FourOfAKind: |
289 | //X qDebug( "4oaK" ); | 295 | //X odebug << "4oaK" << oendl; |
290 | //X break; | 296 | //X break; |
291 | //X case FullHouse: | 297 | //X case FullHouse: |
292 | //X qDebug( "Full House" ); | 298 | //X odebug << "Full House" << oendl; |
293 | //X break; | 299 | //X break; |
294 | //X case SStraight: | 300 | //X case SStraight: |
295 | //X qDebug( "Short S" ); | 301 | //X odebug << "Short S" << oendl; |
296 | //X break; | 302 | //X break; |
297 | //X case LStraight: | 303 | //X case LStraight: |
298 | //X qDebug( "Long S" ); | 304 | //X odebug << "Long S" << oendl; |
299 | //X break; | 305 | //X break; |
300 | //X case Yatzee: | 306 | //X case Yatzee: |
301 | //X qDebug( "Yatzee!" ); | 307 | //X odebug << "Yatzee!" << oendl; |
302 | //X break; | 308 | //X break; |
303 | //X case Chance: | 309 | //X case Chance: |
304 | //X qDebug( "Chance" ); | 310 | //X odebug << "Chance" << oendl; |
305 | //X break; | 311 | //X break; |
306 | //X } | 312 | //X } |
@@ -336,5 +342,5 @@ void OYatzee::slotStartGame() | |||
336 | void OYatzee::slotRollDices() | 342 | void OYatzee::slotRollDices() |
337 | { | 343 | { |
338 | qDebug( "Roll nummer: %d" , ps.at( currentPlayer-1 )->turn ); | 344 | odebug << "Roll nummer: " << ps.at( currentPlayer-1 )->turn << "" << oendl; |
339 | 345 | ||
340 | if ( ps.at( currentPlayer-1 )->turn == 3 ) | 346 | if ( ps.at( currentPlayer-1 )->turn == 3 ) |
@@ -354,7 +360,7 @@ void OYatzee::slotRollDices() | |||
354 | } | 360 | } |
355 | 361 | ||
356 | //qDebug( "Roll nummer (vorher): %d" , ps.at( currentPlayer-1 )->turn ); | 362 | //odebug << "Roll nummer (vorher): " << ps.at( currentPlayer-1 )->turn << "" << oendl; |
357 | ps.at(currentPlayer-1)->turn++; | 363 | ps.at(currentPlayer-1)->turn++; |
358 | //qDebug( "Roll nummer (nachher): %d" , ps.at( currentPlayer-1 )->turn ); | 364 | //odebug << "Roll nummer (nachher): " << ps.at( currentPlayer-1 )->turn << "" << oendl; |
359 | 365 | ||
360 | detectPosibilities(); | 366 | detectPosibilities(); |
@@ -392,5 +398,5 @@ Resultboard* Scoreboard::nextRB( int currentPlayer ) | |||
392 | b = rbList.at( currentPlayer ); | 398 | b = rbList.at( currentPlayer ); |
393 | 399 | ||
394 | qDebug( "Anzahl: %d" ,rbList.count() ); | 400 | odebug << "Anzahl: " << rbList.count() << "" << oendl; |
395 | 401 | ||
396 | return b; | 402 | return b; |
@@ -609,5 +615,5 @@ void Resultboard::paintEvent( QPaintEvent* ) | |||
609 | { | 615 | { |
610 | int i = it.key(); | 616 | int i = it.key(); |
611 | qDebug( "ok: %d , %d" , i , it.data() ); | 617 | odebug << "ok: " << i << " , " << it.data() << "" << oendl; |
612 | p.drawText( 0, i*cell_height , cell_width , cell_height , Qt::AlignCenter , QString::number( it.data() ) ); | 618 | p.drawText( 0, i*cell_height , cell_width , cell_height , Qt::AlignCenter , QString::number( it.data() ) ); |
613 | } | 619 | } |
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 | |||
@@ -7,5 +7,5 @@ TARGET = oyatzee | |||
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe -lopiecore2 |
10 | 10 | ||
11 | include ( $(OPIEDIR)/include.pro ) | 11 | include ( $(OPIEDIR)/include.pro ) |