Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. int counter = 0;       
  2. counter++; //!<  plus the counter
  3.         if (counter >= 50) //!<  if the counter is bigger or equal to 50 then do this
  4.         {
  5.             movement = generateNum(10); //!< generate a new number
  6.             counter = 0; //!<  reset the counter
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement