Beispiel #1
0
def arrive():
    s = getState()
    s['people'] = s.get("people", 0) + 1
    saveState(s)

    if s['people'] == 1:
        home.on()
        return "You're the first to come home; turning on!"
    
    return "Welcome home! There are now %d people here." % s['people']
Beispiel #2
0
def turnOn():
    home.on()
    return "ok"