6.2.3 Transition Graphs
(require congame/components/transition-graph) | |
package: congame-core |
syntax
(transition-graph transition-clause ...+)
transition-clause = [id transition-entry ...+] transition-entry = --> transition-target transition-target = id | ,transition-lambda transition-lambda = (lambda () transition-expr ...+) | (lambda name:id () transition-expr ...+) transition-expr = (done) | (fail expr) | (goto id:id) | expr
A transition-graph consists of one or more transition-entries. For
example:
(make-study "some study" #:transitions (transition-graph [a --> b --> ,(lambda () (if succes-step-b? (goto bad-ending) (goto good-ending)))] [fail-ending --> fail-ending] [good-ending --> good-ending]) (list (make-step 'a a) (make-step 'b b) (make-step 'c c)))
Forms used in transition-graphs to define transitions between study steps. Use of these
forms in places where a transition graph is not being defined will result in a syntax error.