Ejemplo n.º 1
0
    def __init__(self,
                 avenues=1,
                 streets=1,
                 orient_key='E',
                 beepers=0,
                 name=None,
                 colour='grey',
                 parent=None):
        #UsedRobot.__init__(self, avenues=avenues, orient_key = orient_key,
        #        beepers=beepers, name=name, colour=colour, parent=parent)
        if parent == None:
            parent = Visible_world()

        true_robot = parent.addOneRobot(avenues=avenues,
                                        streets=streets,
                                        orient_key=orient_key,
                                        beepers=beepers,
                                        name=name,
                                        colour=colour,
                                        better=True)
        self.robot = parent.robot_dict[true_robot.name]
        self.name = true_robot.name
        self.program = rur_program()
        self.parent = parent
        self.parent.object_dict[self.name] = True
        self.program.wait_update_refresh(self.robot, self.name)
Ejemplo n.º 2
0
 def __init__(self, parent, id=-1, size=wx.DefaultSize):
     wx.ScrolledWindow.__init__(self,
                                parent,
                                id, (0, 0),
                                size=size,
                                style=wx.SUNKEN_BORDER)
     self.SetBackgroundColour("WHITE")
     self.world = Visible_world()
     self.editor = False  #
     self.InitialiseVariables()
     self.MakePopupMenu()
     self.bindEvents()
     self.SetFocus()