seeding with numbers, generating with characters?
I'm trying to make a function that will generate a tic tac toe board (and a different function will print it) using a nonnegative number seed from the user. I was thinking of doing this by taking the seed, scaling it to [1,2] and having 1 be X and 2 be O. Of course, then I'd have to send some variables with that information back to main and have a different function print it. Is this possible?
I was thinking something like:
What would I have to put in rand so that it would take the input, which is n, and then scale it to [1,2] (or something of the like), where it prints 1 as X and 2 as O, or vice versa. Or is this even possible? If not, how could I do this?
void generateBoard(int input)
rand = ???
I hope that made sense.