0

I have created the paddle, ball, and bricks, but when I write the code to make paddle move nothing happens. I tried to write the ball movement code also but that doesn't work either. I think I am missing something. paddle movement code

I have tried many different things. When I move line 79 inside the while loop i Seg fault. I was however able to printf a statement if I put it just inside the while loop. I guess i'm a little lost as to how the code has to be written inside the while loop for this part and the subsequent.

I am also confused as to what the initBall and initPaddle codes need to return. should it keep the return NULL line or something else?

Any help is greatly appreciated.

  • about getting a segmentation fault, what are you returning from initPaddle? – Kareem Jun 28 '15 at 16:51
2

of course you should be listening to mouse events (call getNextEvent) inside the loop because you wanna keep listening to mouse events again and again not only once.

| improve this answer | |
  • Thanks I got it to work now I don't know why it wasn't working before. – Brad Jun 29 '15 at 1:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .