Ejemplo n.º 1
0
def step_1(s):
    """Move the robot"""
    s.ui.filename = lvl_directory+"/tutorial"
    s = ui.load(s)
    s = ui.lab(s)
    s.ui.active = ui.ALL_INACTIVE
    s.ui.active["editor_wild_lab_terrain"] = True
    s.ui.active["lab_wild_quit"] = True
    s.ui.active.update({k: True for k in ui.ALL_INACTIVE
                        if "_text" in k})
    s.ui.log_text = ""
    s.ui.story_text = """This is your lab.
The blue robot is a test robot.
His name is Bob.
You can control its position."""
    s.ui.obj_text = "Click on the green patch to move the robot there."
    s.obj_func = lambda s: s.lab[6, 8] % 1000 == 201
    s.next_func = step_2
    return s
Ejemplo n.º 2
0
def lab(s):
    s = ui.lab(s)
    s.ui.active = ui.EDITOR_ACTIVE.copy()
    return s