summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
authorblob8108 <blob8108@gmail.com>2014-01-05 23:42:53 +0000
committerblob8108 <blob8108@gmail.com>2014-01-05 23:42:53 +0000
commitaebd5fca0d44cb98f7aad913bb8abe77261e8065 (patch)
tree410771883a207899a39ad0a23a20ec6285b2f568 /example.py
parent830d200bd1e1002d6f0356b22963e1caa516cd80 (diff)
downloadblockext-aebd5fca0d44cb98f7aad913bb8abe77261e8065.tar.gz
blockext-aebd5fca0d44cb98f7aad913bb8abe77261e8065.zip
Add `problem` and `reset` decorators
Fixes #5
Diffstat (limited to 'example.py')
-rw-r--r--example.py15
1 files changed, 15 insertions, 0 deletions
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)