Hello, I am trying to use std.rand to generate a random number to randomise the position of a sprite. The problem is that the random number is generated only once and then the number is kept forever until I recompile the application changing the code. What am I doing wrong?
var rand_impl = std.rand.DefaultPrng.init(0);
var num = rand_impl.random().intRangeAtMost(i32, 120, WINDOW_HEIGHT - 120);
currentDrone.dest.y = num;
I am sure I am missing something.