My problem is that I want to be able to produce repeatable sequences of random numbers.

My simplified example of what I want to accomplish:

Poker Game: I want to be able to shuffle the deck & deal the cards to 10 players. play the hand/game then be able to repeat the game, but moving each player around the table. Therefore everyone gets to play everyone elses hand.

Now this seems obvious to just seed using a known number, then reseed it to produce the same sequence. But my problem is that while playing any given hand I may use rand() an arbitrary number of times, in between dealing the cards. therefore the next time I use rand() it may be at sequence index[30] or index[42], which will then produce different numbers.

Is there anyway using rand() or some other random library to be able to pick and choose different sequences to randomize. Like keep sequence A for shuffling Cards and sequence B for other random uses.

I know the idea can be done, as I have used it in the 3d modelling software Maya, using its MEL command syntax ( annoyingly I know it's even written in C++ ):

http://download.autodesk.com/us/maya...ands/rand.html