[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [pbmserv-dev] comment on undo
> It would be nice if all pbmserv games were replayable.
I had tried to make Scramble replayable by storing the random number
generator seed in the game file. Then, if the game was replayed, to use this
stored seed to reseed the random generator. Theoretically, this should cause
all the tiles to be sorted in the same order, and redistributed exactly as
before. But I could never get it to work; I think because there is
"strategically placed" seeding going on in the base classes that undoes my
attempt to set the seed. If anyone can come up with a way to actually make
this method work, I'd like to know about it!
So for Scramble, I decided to just save the previous board and re-use it if
someone does an "undo". Not pretty, but it does work.
- Bob