Skip to content

Commit

Permalink
remove unused concurrent_action functionality
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 672950149
Change-Id: I02f7a933bfc7c2dace4e7607bc480a90caee93c3
  • Loading branch information
jagapiou authored and copybara-github committed Sep 10, 2024
1 parent 8f65ac1 commit 10bc9d2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions concordia/environment/game_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def __init__(
players_act_simultaneously: bool = True,
verbose: bool = False,
concurrent_externalities: bool = True,
concurrent_action: bool = False,
use_default_instructions: bool = True,
log_color: str = 'red',
):
Expand All @@ -125,8 +124,6 @@ def __init__(
false then advance time after each player acts.
verbose: whether to print debugging information or not.
concurrent_externalities: if true, runs externalities in separate threads
concurrent_action: if true, runs player actions and events in separate
threads
use_default_instructions: set to False if you want to skip the standard
instructions used for the game master, e.g. do this if you plan to pass
custom instructions as a constant component instead.
Expand All @@ -144,7 +141,6 @@ def __init__(
self._action_spec = {player.name: action_spec for player in players}
else:
self._action_spec = dict(action_spec)
self._concurrent_action = concurrent_action

components = list(components)
if use_default_instructions:
Expand Down Expand Up @@ -367,13 +363,10 @@ def step(
if self._randomise_initiative:
random.shuffle(players)

if self._concurrent_action:
concurrency.map_parallel(step_player_fn, players)
else:
for player in players:
step_player_fn(player)
if not self._players_act_simultaneously:
self._clock.advance()
for player in players:
step_player_fn(player)
if not self._players_act_simultaneously:
self._clock.advance()
if self._players_act_simultaneously:
self._clock.advance()

Expand Down

0 comments on commit 10bc9d2

Please sign in to comment.