Skip to main content
added 49 characters in body
Source Link
Juraj
  • 18.3k
  • 4
  • 32
  • 50

The code works without the display commands. A problem could be that you start with negative pos_y and use it as parameter for drawFastVLine.

Function random returns first parameter if it is a larger value then the second parameter. random(-5, -20) always returns -5.

To have more random random values, you should call randomSeed in setup().

And you can use global array Drop drop[50];.

The code works without the display commands. A problem could be that you start with negative pos_y and use it as parameter for drawFastVLine.

Function random returns first parameter if it is a larger value then the second parameter. random(-5, -20) always returns -5.

To have more random random values, you should call randomSeed in setup().

The code works without the display commands. A problem could be that you start with negative pos_y and use it as parameter for drawFastVLine.

Function random returns first parameter if it is a larger value then the second parameter. random(-5, -20) always returns -5.

To have more random random values, you should call randomSeed in setup().

And you can use global array Drop drop[50];.

Source Link
Juraj
  • 18.3k
  • 4
  • 32
  • 50

The code works without the display commands. A problem could be that you start with negative pos_y and use it as parameter for drawFastVLine.

Function random returns first parameter if it is a larger value then the second parameter. random(-5, -20) always returns -5.

To have more random random values, you should call randomSeed in setup().