Code runs perfectly when the initialization functions are called. I get the bricks, the ball and the paddle which moves with mouse. However, when program calls
move(ball, velocity, vertical);
where velocity = 2
and vertical = 4
, the ball disappears from the window. I have tried the syntax in the documentation (i.e. gobject -> move(dx, dy)
) but compiler didn't like that. GDB is no help either, tried running getX()
to see where ball was, but there was no ball in context. I suppose I could write my own move function, but am wondering why this method makes my ball disappear.