Mercurial > sypikslang
comparison gamelib/tests/repl_game.py @ 224:e4f9513c9dd0
Include mission name in the results
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 22:33:05 +0200 |
parents | a40a76012bd7 |
children |
comparison
equal
deleted
inserted
replaced
223:19aae2b701d1 | 224:e4f9513c9dd0 |
---|---|
62 research_list = [self.science[i - 1] for i in research_list] | 62 research_list = [self.science[i - 1] for i in research_list] |
63 self.game.cur_allocation.extend(research_list) | 63 self.game.cur_allocation.extend(research_list) |
64 self.game.cur_missions.extend(missions) | 64 self.game.cur_missions.extend(missions) |
65 print "-" * 10, "RESULTS", "-" * 31 | 65 print "-" * 10, "RESULTS", "-" * 31 |
66 messages = self.game.end_turn() | 66 messages = self.game.end_turn() |
67 for msg_type, msg in messages: | 67 for miss, msg_type, msg in messages: |
68 if miss: | |
69 print 'Mission: %s' % miss | |
68 if msg_type == NEW_SCIENCE or msg_type == NEW_SCHEMATIC: | 70 if msg_type == NEW_SCIENCE or msg_type == NEW_SCHEMATIC: |
69 print msg | 71 print msg |
70 elif msg_type == FAILURE: | 72 elif msg_type == FAILURE: |
71 print 'Mission failure: %s' % msg | 73 print 'Mission failure: %s' % msg |
72 elif msg_type == SUCCESS: | 74 elif msg_type == SUCCESS: |