package elm_playground_gamekits

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module AdventureSource

Sourcetype place =
  1. | Room of string
  2. | Carried
  3. | Inside of string
  4. | Nowhere
Sourcetype world = {
  1. here : string;
  2. places : (string * place) list;
  3. flags : string list;
  4. score : int;
  5. turns : int;
}
Sourceval start : string -> (string * place) list -> world
Sourceval where : world -> string -> place
Sourceval put : string -> place -> world -> world
Sourceval go : string -> world -> world
Sourceval has : world -> string -> bool
Sourceval set : string -> world -> world
Sourceval unset : string -> world -> world
Sourceval visible : world -> string -> bool
Sourceval in_room : world -> string list
Sourceval carried : world -> string list
Sourcetype sentence = {
  1. verb : string;
  2. obj : string option;
  3. with_ : string option;
}
Sourcetype rule = {
  1. verb : string;
  2. obj : string option;
  3. with_ : string option;
  4. test : sentence -> world -> bool;
  5. act : sentence -> world -> world * string;
}
Sourceval any : string option
Sourceval always : sentence -> world -> bool
Sourceval run : rule list -> sentence -> world -> world * string