saving algorithm
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sun Mar 25 12:55:43 EDT 2007
En Fri, 23 Mar 2007 20:42:33 -0300, mona bin jubair <dear_kandy at yahoo.com>
escribió:
> i want to ask about the algorithm's steps of saving
> games(sudoku,battleship)?
First determine what goes into the game "state" (that is, what defines the
current state of the game). Perhaps you also want some history. Then, save
that game state: using pickle, or a database, or even a simple
ConfigParser file. See http://docs.python.org/lib/persistence.html
--
Gabriel Genellina
More information about the Python-list
mailing list