comparison gamelib/gamestate.py @ 27:4d9610c59efa

Reset points after spending them.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 06 May 2012 19:28:15 +0200
parents 27570aca5d17
children 12c33aac7684
comparison
equal deleted inserted replaced
26:5d699b1f7188 27:4d9610c59efa
50 # Do the science 50 # Do the science
51 self.points -= len(self.cur_allocation) 51 self.points -= len(self.cur_allocation)
52 if self.points < 0: 52 if self.points < 0:
53 raise RuntimeError('Spent too many points') 53 raise RuntimeError('Spent too many points')
54 new_stuff = self.lab.spend_points(self.cur_allocation, self.points) 54 new_stuff = self.lab.spend_points(self.cur_allocation, self.points)
55 self.points = 0
55 # Process mission results 56 # Process mission results
56 for result in mission_results: 57 for result in mission_results:
57 result.apply(self) 58 result.apply(self)
58 for science in new_stuff: 59 for science in new_stuff:
59 # FIXME: Update UI better. 60 # FIXME: Update UI better.