Skip to content

Commit

Permalink
Remove dead code from the GM. update_from_event is writing its own me…
Browse files Browse the repository at this point in the history
…mories and returns none.

PiperOrigin-RevId: 588081410
Change-Id: I9643ddf6f5aeea446acb4669fba26bb5fbb210e8
  • Loading branch information
vezhnick authored and copybara-github committed Dec 5, 2023
1 parent 35ad6b4 commit 208c27a
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions concordia/environment/game_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,24 +202,12 @@ def update_from_player(self, player_name: str, action_attempt: str):
def get_externality(externality):
return externality.update_after_event(event_statement)

consequences = []
if self._concurrent_externalities:
with concurrent.futures.ThreadPoolExecutor() as executor:
for result in executor.map(
get_externality, list(self._components.values())):
if result:
consequences.extend(result)
executor.map(get_externality, self._components.values())
else:
for externality in self._components.values():
result = externality.update_after_event(event_statement)
if result:
consequences.extend(result)

for fact in consequences:
if fact:
if self._verbose:
self._print(fact, 'white')
self._memory.add(fact) # could be multi-threaded, helps with importance
externality.update_after_event(event_statement)

self._last_chain = prompt

Expand Down

0 comments on commit 208c27a

Please sign in to comment.