From fd05e9e5e59d954a2ecdb277d302b760a21ea371 Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:41:15 -0400 Subject: [PATCH] duplicate some code for success --- pokemonred_puffer/environment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index f510cb0..780dece 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -292,6 +292,8 @@ def reset(self, seed: Optional[int] = None, options: Optional[dict[str, Any]] = self.read_m(i).bit_count() for i in range(EVENT_FLAGS_START, EVENT_FLAGS_START + EVENTS_FLAGS_LENGTH) ) + # A bit of duplicate code. Blah. + self.required_events = self.get_required_events() self.seen_pokemon = np.zeros(152, dtype=np.uint8) self.caught_pokemon = np.zeros(152, dtype=np.uint8) self.moves_obtained = np.zeros(0xA5, dtype=np.uint8)