Table of Contents

Class OutwardShapeChecker

Namespace
DialogueDown.Playbook.Checking
Assembly
DialogueDown.Playbook.dll

Refuses a node whose ways out are the wrong shape for its kind.

public sealed class OutwardShapeChecker : IPlaybookChecker
Inheritance
OutwardShapeChecker
Implements
Inherited Members

Remarks

Each node kind offers one kind of arm — a divert for a line or a control, an option for a choice, a random-option for a random choice, a branch for a branch — and either always has a way on or does not. The compiler only ever emits nodes that hold to this, but the format does not say so, so a hand-edited or tool-written playbook can carry a line with two ways forward, an option out of an end, or a choice that can withhold every arm with nowhere to fall through. A runtime would then play whichever edge came first in the array.

The static half of the rule — which arm kind, and how many — is the table in For(Node). The rest is read from the node itself: a fall-through is needed unless some arm always applies, which means an unconditional arm on a node that is not itself conditional. A node that could reach a dead end, or one carrying an edge kind it cannot act on, is refused. A succession that can never run is accepted: it plays no differently.

Methods

Check(PlaybookDocument)

Checks a playbook, and says nothing when it passes.