Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sc2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ async def _play_game(
return result


async def _play_replay(client, ai, realtime=False, player_id=0):
async def _play_replay(client, ai, realtime=False, player_id=1):
ai._initialize_variables()

game_data = await client.get_game_data()
Expand Down Expand Up @@ -455,7 +455,7 @@ async def _setup_replay(server, replay_path, realtime, observed_id):
async def _host_replay(replay_path, ai, realtime, _portconfig, base_build, data_version, observed_id):
async with SC2Process(fullscreen=False, base_build=base_build, data_hash=data_version) as server:
client = await _setup_replay(server, replay_path, realtime, observed_id)
result = await _play_replay(client, ai, realtime)
result = await _play_replay(client, ai, realtime, observed_id)
return result


Expand Down Expand Up @@ -498,7 +498,7 @@ async def run_host_and_join():
return result


def run_replay(ai, replay_path, realtime=False, observed_id=0):
def run_replay(ai, replay_path, realtime=False, observed_id=1):
portconfig = Portconfig()
assert os.path.isfile(replay_path), f"Replay does not exist at the given path: {replay_path}"
assert os.path.isabs(
Expand Down
3 changes: 0 additions & 3 deletions sc2/observer_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ def time_formatted(self) -> str:
t = self.time
return f"{int(t // 60):02}:{int(t % 60):02}"

@property
def game_info(self) -> GameInfo:
""" See game_info.py """
return self._game_info

@property
def game_data(self) -> GameData:
""" See game_data.py """
return self._game_data

@property
def client(self) -> Client:
""" See client.py """
return self._client
Expand Down