Labels example runs perfectly
This commit is contained in:
13
examples/labels/main.hank
Normal file
13
examples/labels/main.hank
Normal 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!
|
||||
20
examples/labels/test1.hlog
Normal file
20
examples/labels/test1.hlog
Normal 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!
|
||||
20
examples/labels/test2.hlog
Normal file
20
examples/labels/test2.hlog
Normal 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!
|
||||
Reference in New Issue
Block a user