I have a tiny question
I am making a snake Game
And My snake is ready and moving very good
But now I have A very big question How can I generate apples or dots randomly any where
I tried many things I even tried some old c++ tricks
Like if defined position of a sprite is
Sprite.SetPosition(200.f, 100.f);
And I want to set in any where
So I was tring put
Sprite.SetPosition(A.f, A.f);
and then define A as an int
after that the random function of SFML given in tutorials so that there will be a random number at point of A
Well my logic was a bit right But I saw that , the program of sprite dosnt accept anything like int or anything it only accepts class/struct/union
So now my big question is how to get that random value can anybody please help?