Skip to content

Instantly share code, notes, and snippets.

@WhatIThinkAbout
Last active July 24, 2022 09:21
Show Gist options
  • Select an option

  • Save WhatIThinkAbout/d635d36e012693f4db1e8e279954dd7d to your computer and use it in GitHub Desktop.

Select an option

Save WhatIThinkAbout/d635d36e012693f4db1e8e279954dd7d to your computer and use it in GitHub Desktop.
class BabyRobotEnv_v5( BabyRobotEnv_v4 ):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def render(self, info=None):
''' render as an HTML5 canvas '''
# move baby robot to the current position
self.robot.move(self.x,self.y)
# write the info to the grid side-panel
self.show_info(info)
return self.level.draw()
def show_info(self,info):
''' display the supplied information on the grid level '''
self.level.show_info( info )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment