Finish adding anonymous labels, unit tests
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
#cycle 1
|
||||
:@
|
||||
#take gems 100 @f
|
||||
#give score 100
|
||||
#@b
|
||||
:@
|
||||
#take gems 10 @f
|
||||
#give score 10
|
||||
#@b
|
||||
:@
|
||||
#take gems 1 @f
|
||||
#give score 1
|
||||
#@b
|
||||
:@
|
||||
Your gems have been redeemed for score.
|
||||
---
|
||||
#end
|
||||
:touch
|
||||
#if not blocked rnd @f
|
||||
I'm another object with anonymous labels.
|
||||
#end
|
||||
:@
|
||||
#if blocked rndne @f
|
||||
Anonymous label names can be reused.
|
||||
#end
|
||||
:@
|
||||
Compare my code with the other object's.
|
||||
@@ -0,0 +1,18 @@
|
||||
#end
|
||||
:touch
|
||||
#take gems 100 lt100
|
||||
#give gems 100
|
||||
You have hundreds of gems.
|
||||
#end
|
||||
:lt100
|
||||
#take gems 10 lt10
|
||||
#give gems 10
|
||||
You have tens of gems.
|
||||
#end
|
||||
:lt10
|
||||
#take gems 1 lt1
|
||||
#give gems 1
|
||||
You have at least one gem.
|
||||
#end
|
||||
:lt1
|
||||
You don't have any gems!
|
||||
Reference in New Issue
Block a user