Robostagram / Robotagram

The original game that popped out of the attic !
5 stars 0 forks source link

Serialization/deserialization/persistence of a board #22

Closed tsimbalar closed 12 years ago

tsimbalar commented 12 years ago

Allow persistence of boards by storing a serialized version of it in Db.

related to #2 room/game management

I believe we should store somewhere the boards we use.

Then in a room, when we create a game, we should store with that game :

This only happens when a game start, and consequent request just return the contents of the db ... This makes it easier to keep a stateless app (no more hashmaps in memory and things like that ... just load from db on each request)

tsimbalar commented 12 years ago

Each variation of the standard board is stored in db the first time the app is launched. The list of boards can be seen in /boards/ (showing the serialized format) A preview of the board is shown in /boards/n , using the same template as the one we use to show a game.