1
0
mirror of https://github.com/gsi-upm/soil synced 2025-08-23 19:52:19 +00:00

Fix incompatibility and bug in get_agents

This commit is contained in:
J. Fernando Sánchez
2019-05-16 19:59:46 +02:00
parent 97835b3d10
commit 6690b6ee5f
7 changed files with 27 additions and 16 deletions

View File

@@ -59,7 +59,7 @@ class Patron(FSM):
2) Look for a bar where the agent and other agents in the same group can get in.
3) While in the bar, patrons only drink, until they get drunk and taken home.
'''
level = logging.INFO
level = logging.DEBUG
defaults = {
'pub': None,
@@ -113,7 +113,8 @@ class Patron(FSM):
@state
def at_home(self):
'''The end'''
self.debug('Life sucks. I\'m home!')
others = self.get_agents(state_id=Patron.at_home.id, limit_neighbors=True)
self.debug('I\'m home. Just like {} of my friends'.format(len(others)))
def drink(self):
self['pints'] += 1