In my class I am working on building a snake game app. I have pretty much completed it and it works as intended. The jar file they use to run the application creates a random object and passes it to a constructor in my class which takes it as a parameter. Since I will use it to generate a new location (x,y) position of the item that the snake eats, I created a new random object so it could be set to the random parameter. In another method I pass nextInt(bound) for each X, Y. My main concern is that I think the testing software wants to know the seed so it can verify that my program works. My concern is that the random object that I created has a different seed than the passed in random parameter does. Is that the case? or does it essentially copy the seed? I have included screenshots.
Aucun commentaire:
Enregistrer un commentaire