I've searched around but didn't find a solid answer. I'm building a game in AS3. I have no issue generating random map (2D tiles) for my game, which is basically made of random numbers. How do I obtain the exact same result all the time passing a seed parameter to my function ?
function generate(__xt:uint, __yt:uint){
var rnd:int;
for (var i:uint=0; i < __xt; i++){
for(var j:uint=0; j < __yt; j++){
rnd = Math.round(Math.random());
...
}
}
}