mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-31 10:09:53 +00:00
Fix the initialization of render mode set (#2938)
This commit is contained in:
@@ -54,9 +54,9 @@ class Renderer:
|
|||||||
|
|
||||||
This method should be usually called inside environment's step and reset method.
|
This method should be usually called inside environment's step and reset method.
|
||||||
"""
|
"""
|
||||||
if self.mode is not None and self.mode not in SINGLE_RENDER:
|
if self.mode is not None and self.mode not in self.single_render:
|
||||||
render_return = self.render(self.mode)
|
render_return = self.render(self.mode)
|
||||||
if self.mode not in NO_RETURNS_RENDER:
|
if self.mode not in self.no_returns_render:
|
||||||
self.render_list.append(render_return)
|
self.render_list.append(render_return)
|
||||||
|
|
||||||
def get_renders(self) -> Optional[List]:
|
def get_renders(self) -> Optional[List]:
|
||||||
@@ -64,9 +64,9 @@ class Renderer:
|
|||||||
|
|
||||||
This method should be usually called in the environment's render method to retrieve the frames collected till this time step.
|
This method should be usually called in the environment's render method to retrieve the frames collected till this time step.
|
||||||
"""
|
"""
|
||||||
if self.mode in SINGLE_RENDER:
|
if self.mode in self.single_render:
|
||||||
return self.render(self.mode)
|
return self.render(self.mode)
|
||||||
elif self.mode is not None and self.mode not in NO_RETURNS_RENDER:
|
elif self.mode is not None and self.mode not in self.no_returns_render:
|
||||||
renders = self.render_list
|
renders = self.render_list
|
||||||
self.render_list = []
|
self.render_list = []
|
||||||
return renders
|
return renders
|
||||||
|
Reference in New Issue
Block a user