From aebd5fca0d44cb98f7aad913bb8abe77261e8065 Mon Sep 17 00:00:00 2001 From: blob8108 Date: Sun, 5 Jan 2014 23:42:53 +0000 Subject: Add `problem` and `reset` decorators Fixes #5 --- example.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'example.py') diff --git a/example.py b/example.py index 8a67c24..8eb0638 100644 --- a/example.py +++ b/example.py @@ -91,6 +91,21 @@ def move(steps): } """ +@problem +def my_problem(): + return "The Scratch Sensor board is not connected. Foo." + +@reset +def my_reset(): + print(""" + Reset! The red stop button has been clicked, + And now everything is how it was. + ... + (Poetry's not my strong point, you understand.) + """) + + + if __name__ == "__main__": blockext.run("Fancy Spaceship", "spaceship", 1234) -- cgit v1.3.1