row = sorrows.data.GetTable("users").LookupRow("name", "donky")The access of the "passwordHash" field in the row, returns the value if the field exists. We enter in the table metadata that this general field had a successful read access recording the timestamp. If the field does not exist, then a suitable exception occurs.
if newPasswordHash != row.passwordHash:The login password was correct, so we want to actually log the user in. One part of this is recording when they last logged in. If the "lastLoginTime" field exists, we simply store a new value in it, again storing in the table metadata that this general field had a successful write access recording the timestamp. If it does not exist, it gets added as a new field in the table metadata, and the value stored as mentioned in the last sentence.
# Check the entered password is correct…
row.lastLoginTime = time.time()At this point the system is usable as a simple datastore and is easily implementable. The only additional functionality it needs is introspection, so that undiscovered incorrect usage can be observed. For instance, by listing table fields in order of least recent access, obsolete fields are highlighted.
And Twisol, there are plenty of books to pick up if you're really interested in software design (especially game software design), and you should most definitely peruse sites like gamasutra and gamedev. A lot of their content is focused on the big mass-market 3D games of today, but most of the stuff not directly related to graphics and physics is equally applicable to text games. You'll get a lot more going straight to the source than you will out of my rambling, diluted, tldr-inspiring re-hashes. ;) And there's always DigiPen…