How would I take a textual input from the user (anything their keyboard would allow them to type), and transfer it to a number?
From there, I would probably take that number, and feed it into a seeded random number generator.
I’m getting the idea from Minecraft’s random seed option, but I can’t find anything on it.
There are probably more interesting algorithms but this just converts the characters to ints and multiplies it by the position in order to weight them (so that ‘abc’ is different than ‘cba’). You could also use a hash function of some kind as well, but I thought that might be overkill for this purpose.
Keep in mind though, you can’t seed the
Math.random()function in Javascript, it always just uses the current date for the seed.