Labels example runs perfectly

This commit is contained in:
2019-04-30 18:47:56 -06:00
parent 78b2eaed8d
commit 703051ca25
3 changed files with 0 additions and 0 deletions

13
examples/labels/main.hank Normal file
View File

@@ -0,0 +1,13 @@
- (start)
Loop #: {start}
A: {choice_a}
B: {choice_b}
C: {choice_c}
* (choice_a) Choice A
* (choice_b) Choice B
* (choice_c) {choice_b + choice_a == 2} Choice C // TODO need a better way to && variables
-> end
- -> start
- (end)
It's over!

View File

@@ -0,0 +1,20 @@
Loop #: 1
A: 0
B: 0
C: 0
* Choice A
* Choice B
> 1: Choice A
Loop #: 2
A: 1
B: 0
C: 0
* Choice B
> 1: Choice B
Loop #: 3
A: 1
B: 1
C: 0
* Choice C
> 1: Choice C
It's over!

View File

@@ -0,0 +1,20 @@
Loop #: 1
A: 0
B: 0
C: 0
* Choice A
* Choice B
> 2: Choice B
Loop #: 2
A: 0
B: 1
C: 0
* Choice A
> 1: Choice A
Loop #: 3
A: 1
B: 1
C: 0
* Choice C
> 1: Choice C
It's over!