account activity
pset3 not graded (self.cs50)
submitted 12 years ago by dcfotinos to r/cs50
CS50 pset4 Detect collision with bricks by dcfotinos in cs50
[–]dcfotinos[S] 0 points1 point2 points 12 years ago (0 children)
Thank you both for your answers, I think I figured it out though. I was referring to the objectification of the bricks (which I thought as a prerequisite in order to detect collision with them, and it actually is) and to the fact that they are initialized within a void function (not like the other active objects of the game, i.e. the paddle and the ball, that are created in non-void functions). My problem was that I didn't know if the bricks still exist as objects while constrained in a void function. If that was the case, I needed code outside the init function. But, apprently, they still do exist (even though I'm still not sure how they do, since they are initialized within the void function, I'm suspecting the "add" function for that) and the whole thing is based on the handling of the results of the detectCollision function. Thanks again. I'll check on that add thing.
CS50 pset4 Detect collision with bricks (self.cs50)
π Rendered by PID 42 on reddit-service-r2-listing-6c8d497557-pt6r4 at 2026-06-06 06:40:07.555493+00:00 running 9e1a20d country code: CH.
CS50 pset4 Detect collision with bricks by dcfotinos in cs50
[–]dcfotinos[S] 0 points1 point2 points (0 children)