http://www.peachpit.com/store/game-mechanics-advanced-game-d... has an online editor for storing values in containers, then with rules for moving those values eg.
every turn, +1 food every turn, 50% chance of .. etc
it's pretty detailed, worth looking into