com.rayrobdod

script

package script

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. script
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final case class GoTo[State](href: () ⇒ ScriptElement[State], useFun: (State) ⇒ Boolean = constTrue) extends ScriptElement[State] with Product with Serializable

    A script element that allows indirection - either for the purposes of deferred execution, or for creating looping constructs

    A script element that allows indirection - either for the purposes of deferred execution, or for creating looping constructs

    href

    a function pointing to the ScriptElement that this will execute

    useFun

    a function called directly by the use method

  2. final case class Group[State](elems: Seq[ScriptElement[State]], useFun: (State) ⇒ Boolean = constTrue) extends ScriptElement[State] with Product with Serializable

    A container for other script elements.

    A container for other script elements. Each inner script element is executed sequentially

    elems

    the contained scriptElements

    useFun

    a function called directly by the use method

  3. final case class Options[State](options: Seq[(String, ScriptElement[State])], useFun: (State) ⇒ Boolean = constTrue) extends ScriptElement[State] with Product with Serializable

    Prompts the user to enter one of several options.

    Prompts the user to enter one of several options. It executes only the ScriptElement corresponding to the item the user selected.

    options

    the options

    useFun

    a function called directly by the use method

  4. trait ScriptElement[-State] extends AnyRef

    A script element

  5. final case class SetFlag[State](flag: String, setTo: Int, useFun: (State) ⇒ Boolean = constTrue) extends ScriptElement[State] with Product with Serializable

    Sets a flag in the current state.

    Sets a flag in the current state.

    flag

    the name of the flag to set

    setTo

    the value to set the flag to.

    useFun

    a function called directly by the use method

    To do

    would setTo:(Int) => Int be useful?

  6. final case class Speak[State](speaker: String, emotion: String, words: String, useFun: (State) ⇒ Boolean = constTrue) extends ScriptElement[State] with Product with Serializable

    A script element that represents an entity speaking

    A script element that represents an entity speaking

    speaker

    the entity that is speaking

    emotion

    the emotion of the entity that is speaking

    words

    the spoken words

    useFun

    a function called directly by the use method

  7. final case class YesNo[State](flag: String, useFun: (State) ⇒ Boolean = constTrue) extends ScriptElement[State] with Product with Serializable

    Prompts the user to enter Yes or No.

    Prompts the user to enter Yes or No.

    It doesn't ask anything, so whatever the Y/N is a response to should have been printed using a com.rayrobdod.script.Speak or similar already.

    flag

    the name of the flag to set

    useFun

    a function called directly by the use method

Value Members

  1. object NoOp extends ScriptElement[Any] with Product with Serializable

    A no-op

  2. package consoleView

  3. object constTrue extends AbstractFunction1[Any, Boolean]

  4. package parser

Inherited from AnyRef

Inherited from Any

Ungrouped