-.. raw:: latex
-
- \newpage
-
======================================
Appendix C -- "William Tell" story
======================================
+.. highlight:: transcript
.. only:: html
.. image:: /images/picW.png
:align: left
-.. raw:: latex
-
- \dropcap{w}
-
-illiam Tell, our second game, is also very straightforward. See "William
-Tell: a tale is born" on page 69, "William Tell: the early years" on
-page 79, "William Tell: in his prime" on page 91 and "William Tell: the
-end is nigh" on page 103.
+|W|\illiam Tell, our second game, is also very straightforward. See
+:doc:`/chapters/06`, :doc:`/chapters/07`, :doc:`/chapters/08` and
+:doc:`/chapters/09`.
Transcript of play
==================
.. literalinclude:: /examples/Tell.inf
:language: inform6
+.. _compile-as-you-go:
+
Compile-as-you-go
=================
Tell.inf(47): Error: No such constant as "quiver"
Compiled with 3 errors and 3 warnings
-However, by adding these lines to the end of your game file::
+However, by adding these lines to the end of your game file:
+
+.. code-block:: inform
! ===============================================================
! TEMPORARY DEFINITIONS NEEDED TO COMPILE AT THE END OF CHAPTER 6
** The room "(street)" has no "description" property **
>
+.. Generated by autoindex
+.. index::
+ pair: description; library property
+
Whoops! We've fallen foul of Inform's rule saying that every room must
-have a ``description`` property, to be displayed by the interpreter when
-you enter that room. Our ``street`` stub hasn't got a ``description``,
+have a :prop:`description` property, to be displayed by the interpreter when
+you enter that room. Our ``street`` stub hasn't got a :prop:`description`,
so although the game compiles successfully, it still causes an error to
be reported at run-time.
The best way round this is to extend the definition of our ``Room``
-class, thus::
+class, thus:
+
+.. code-block:: inform
Class Room
with description "UNDER CONSTRUCTION",
By doing this, we ensure that *every* room has a description of some
form; normally we'd override this default value with something
meaningful -- "The narrow street runs north towards the town square..."
-and so on -- by including a ``description`` property in the object's
+and so on -- by including a :prop:`description` property in the object's
definition. However, in a stub object used only for testing, a default
description is sufficient (and less trouble)::
>
+.. Generated by autoindex
+.. index::
+ pair: name; library property
+
You'll notice a couple of interesting points. Because we didn't supply
external names with our ``street`` , ``bow`` and ``quiver`` stubs, the
compiler has provided some for us -- ``(street)`` , ``(bow)`` and
``(quiver)`` -- simply by adding parentheses around the internal IDs
which we used. And, because our ``bow`` and ``quiver`` stubs have no
-``name`` properties, we can't actually refer to those objects when
+:prop:`name` properties, we can't actually refer to those objects when
playing the game. Neither of these points would be acceptable in a
finished game, but for testing purposes at this early stage -- they'll
do.
have moved on, and we now need a different set of stub objects. For a
test compilation at this point, remove the previous set of stubs, and
instead add these -- ``south_square`` and ``apple`` objects, and a dummy
-action handler to satisfy the ``Talk`` action in Helga’s life property::
+action handler to satisfy the ``Talk`` action in Helga’s life property:
+
+.. code-block:: inform
! ===============================================================
! TEMPORARY DEFINITIONS NEEDED TO COMPILE AT THE END OF CHAPTER 7
[ TalkSub; ];
Similarly, at the end of Chapter 8, replace the previous stubs by these
-if you wish to check that the game compiles::
+if you wish to check that the game compiles:
+
+.. code-block:: inform
! ===============================================================
! TEMPORARY DEFINITIONS NEEDED TO COMPILE AT THE END OF CHAPTER 8