Skip to content
Snippets Groups Projects
Commit 79aaaf6f authored by Christopher Hesse's avatar Christopher Hesse Committed by Vicki Pfau
Browse files

docs: update movie example

parent 93e61728
No related branches found
No related tags found
No related merge requests found
...@@ -70,11 +70,13 @@ while True: ...@@ -70,11 +70,13 @@ while True:
```python ```python
import retro import retro
env = retro.make(game='SonicTheHedgehog-Genesis', state='GreenHillZone.Act1', use_restricted_actions=retro.ACTIONS_ALL)
env.reset()
movie = retro.Movie('SonicTheHedgehog-Genesis-GreenHillZone.Act1-0000.bk2') movie = retro.Movie('SonicTheHedgehog-Genesis-GreenHillZone.Act1-0000.bk2')
movie.step() movie.step()
env = retro.make(movie.get_game(), None, use_restricted_actions=retro.ACTIONS_ALL)
env.initial_state = movie.get_state()
env.reset()
while movie.step(): while movie.step():
keys = [] keys = []
for i in range(env.NUM_BUTTONS): for i in range(env.NUM_BUTTONS):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment