actually, there are randomness, maybe it's the rng in your game or something like that, I tried to set seed manually to test the randomness :v
Ok thanks, I'll try to implement it differently, but I really like the concept of this random function ;)