comparison gamelib/gamestate.py @ 23:f6a3b213857b

Fix up some game state logic, add very basic REPL game interface.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 06 May 2012 19:06:28 +0200
parents 296ce36fa7d9
children 27570aca5d17
comparison
equal deleted inserted replaced
22:296ce36fa7d9 23:f6a3b213857b
52 # Process mission results 52 # Process mission results
53 for result in mission_results: 53 for result in mission_results:
54 result.apply(self) 54 result.apply(self)
55 # Update the science state with result of spend_points 55 # Update the science state with result of spend_points
56 for science in new_stuff: 56 for science in new_stuff:
57 self.lab.science.append(science) 57 # FIXME: Update UI better.
58 # FIXME: Update UI 58 print "You learned new stuff:", science.NAME
59 59
60 def save_data(self): 60 def save_data(self):
61 """Serialize the game state into a dict""" 61 """Serialize the game state into a dict"""
62 data = {} 62 data = {}
63 data['money'] = self.money 63 data['money'] = self.money