UP | HOME

HW28
COP-3223H

Submit via webcourses.

Let's say you wanted to use random level generation, but you wanted a y_offset of 0 to happen 50% of the time. How could you modify the code to ensure this happens? Hint: use rand() to make the 50% decision, then use rand() as shown for the y_offset in the example. No need for a full program; just sketch the idea.

Author: Paul Gazzillo

Created: 2026-04-01 Wed 11:37

Validate