summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp
index b0e4d88..1a1d05d 100644
--- a/noncore/games/mindbreaker/mindbreaker.cpp
+++ b/noncore/games/mindbreaker/mindbreaker.cpp
@@ -130,13 +130,13 @@ QImage Peg::imageForType(int t)
130 return *normalPegs[rand() % 6]; 130 return *normalPegs[rand() % 6];
131 } 131 }
132 } 132 }
133 return *normalPegs[t]; 133 return *normalPegs[t];
134} 134}
135 135
136Peg::Peg(QCanvas *canvas , int t, int g = -1, int p = -1) 136Peg::Peg(QCanvas *canvas , int t, int g, int p)
137 : QCanvasRectangle(canvas) 137 : QCanvasRectangle(canvas)
138{ 138{
139 setSize(normalPegs[t]->width(), normalPegs[t]->height() ); 139 setSize(normalPegs[t]->width(), normalPegs[t]->height() );
140 pegtype = t; 140 pegtype = t;
141 isplaced = FALSE; 141 isplaced = FALSE;
142 peg_pos = p; 142 peg_pos = p;
@@ -202,13 +202,13 @@ inline int Peg::type() const
202 return pegtype; 202 return pegtype;
203} 203}
204 204
205/* Load the main image, copy from it the pegs, the board, and the answer image 205/* Load the main image, copy from it the pegs, the board, and the answer image
206 * and use these to create the tray, answer and board 206 * and use these to create the tray, answer and board
207 */ 207 */
208MindBreaker::MindBreaker( QWidget *parent=0, const char *name=0, int wFlags=0 ) 208MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags )
209: QMainWindow(parent, name, wFlags), 209: QMainWindow(parent, name, wFlags),
210 canvas(board_height, board_width) 210 canvas(board_height, board_width)
211{ 211{
212 MindBreakerBoard *m = new MindBreakerBoard(canvas, this); 212 MindBreakerBoard *m = new MindBreakerBoard(canvas, this);
213 setCentralWidget(m); 213 setCentralWidget(m);
214 214
@@ -247,15 +247,15 @@ void MindBreaker::setScore(int turns, int games)
247 average = 0.0; 247 average = 0.0;
248 248
249 score->setText(tr("win avg: %1 turns (%2 games)").arg(average).arg(games)); 249 score->setText(tr("win avg: %1 turns (%2 games)").arg(average).arg(games));
250} 250}
251 251
252 252
253MindBreakerBoard::MindBreakerBoard( QCanvas &c, QWidget *parent=0, 253MindBreakerBoard::MindBreakerBoard( QCanvas &canv, QWidget *parent,
254 const char *name=0, int wFlags=0 ) 254 const char *name, int wFlags )
255 : QCanvasView(&c, parent, name, wFlags) 255 : QCanvasView(&canv, parent, name, wFlags)
256{ 256{
257 int i, x, y; 257 int i, x, y;
258 struct timeval tv; 258 struct timeval tv;
259 259
260 current_go = 0; 260 current_go = 0;
261 gettimeofday(&tv, 0); 261 gettimeofday(&tv, 0);