Changeset 6.1.58 for main.py


Ignore:
Timestamp:
08/21/2016 04:35:55 AM (8 years ago)
Author:
David Owen <dsowen@fugue88.ws>
branch-nick:
state
revision id:
dsowen@fugue88.ws-20160821043555-2f74tlv3j5e4wqpg
Message:

Delegated mission_failed()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main.py

    r6.1.57 r6.1.58  
    8686        self.wins += 1
    8787
     88    def mission_failed(self, failures):
     89        print("Mission had {} failures".format(failures))
     90        self.losses += 1
     91
    8892
    8993class AdvanceMission(object):
     
    145149            self.shared.mission_succeeded()
    146150        else:
    147             print("Mission had {} failures".format(failures))
    148             self.shared.losses += 1
     151            self.shared.mission_failed(failures)
    149152
    150153        return AdvanceMission(self.shared)
Note: See TracChangeset for help on using the changeset viewer.