コード例 #1
0
ファイル: shue.py プロジェクト: danallan/shue-server
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']
コード例 #2
0
ファイル: shue.py プロジェクト: danallan/shue-server
def turnOn():
    home.on()
    return "ok"