User interface and command language
The PLAYER interacts with the Zurk engine via a very simple
command language presented on a text console. The PLAYER command
grammar is:
playerCmd := ( NAME )+ NEWLINE
Where NAME and NEWLINE are the corresponding lexical
tokens defined in Section 4.2.2.1. The first NAME
token is interpreted as the PLAYER's command, while succeeding tokens
are interpreted as arguments to that command.
The command MUST be
one of:
- The NAME of an action, as defined by the
current GAME FILE.
- The NAME of a movedef, as defined by the
current game file.
- One of the following special commands:
- look
- If given no arguments, look prints the
description of the PLAYER's current LOCATION. If given one
argument, look prints the description of the
object named by that argument. If given more than one
argument, or an argument that doesn't correspond to a defined
object, a WARNING should be issued. In no case does
look change the GAME STATE.
- inventory
- Prints the contents of the PLAYER's
INVENTORY to the console, sorted in increasing alphabetic order by
OBJECT NAME. inventory takes no arguments and issues a
WARNING if any are provided.
- actions
- Prints all available ACTIONs or MOVEs to the
console, sorted in increasing order by NAME. actions takes
no arguments and issues a WARNING if any are provide.
actions MUST only print MOVEs that are defined for the
PLAYER's current LOCATION, but it MUST print all
non-location-specific ACTIONs (i.e., ACTIONs declared via the
Action WDL statement at the top-level of the GAME FILE).
The actions command MUST NOT attempt to execute the MOVE or
ACTION condstatement to assess whether that MOVE/ACTION is
actually applicable in the current GAME STATE; it is sufficient that
the MOVE/ACTION be declared for the current ROOM.
Note that other commonly used commands such as drop,
get, quit, etc. can and should be implemented in
WDL itself. The designer MAY also choose to implement additional
special commands such as save, load, log,
score, etc. that are not directly supportable in WDL. These
MAY be implemented as special commands or by extending WDL itself.
The Zurk suite MUST provide a plain, text console (no Swing
UI) interface for the PLAYER. All commands are typed in to STDIN, all
normal output is displayed to STDOUT, and all ERROR/WARNING output is
displayed to STDERR. The designer MAY also choose to offer a GUI
interface to the engine, but the text console interface MUST be the
default.
Terran Lane
2005-02-28