X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=chapters%2F04.rst;h=62d471b0aac7388740768d33e97b0d5daea0329a;hb=c2ead72558bf28859c401039c4273d7d31aff05a;hp=8c6a7eda2b2e748d7e0a4b780cab072cbafd5a13;hpb=9e9feffd79cc1c4aa9c387afe98e16c7fbfae78d;p=ibg.git diff --git a/chapters/04.rst b/chapters/04.rst index 8c6a7ed..62d471b 100644 --- a/chapters/04.rst +++ b/chapters/04.rst @@ -86,6 +86,11 @@ room is an object, each item that the player sees and touches is an object; indeed the player herself is also an object (one that's automatically defined by the library). +.. todo:: + + The set-off below needs to be tweaked or perhaps a custom lexer + created to get italics in the right places. + The general model of an **object** definition looks like this:: Object obj_id "external_name" parent_obj_id @@ -284,45 +289,57 @@ This causes another change in the relationships. The bird is now a child of the player (and *not* of the forest), and the player is both a parent (of the bird) and a child (of the forest). -In this diagram, we show how the object relationships change during the -course of the game. The straight lines represent parent--child -relationships, with the parent object at the top of the line, and the child -object at the bottom. +Here we show how the object relationships change during the course of the +game. The straight lines represent parent--child relationships, with the +parent object at the top of the line, and the child object at the bottom. + +1. At the start of the game: + + .. blockdiag:: /figures/heidiobj1.diag + :align: center + :scale: 80% + +2. The player types: ``GO EAST`` + + .. blockdiag:: /figures/heidiobj2.diag + :align: center + :scale: 80% + +3. The player types: ``TAKE THE BIRD`` + + .. blockdiag:: /figures/heidiobj3.diag + :align: center + :scale: 80% + +4. The player types: ``GO NORTHEAST`` -.. list-table:: - :widths: 1 3 5 + .. blockdiag:: /figures/heidiobj4.diag + :align: center + :scale: 80% - * - 1. - - At the start of the game: - - .. image:: /images/heidiobj1.* +5. The player types: ``PUT BIRD IN NEST`` - * - 2. - - The player types: ``GO EAST`` - - .. image:: /images/heidiobj2.* + .. blockdiag:: /figures/heidiobj5.diag + :align: center + :scale: 80% - * - 3. - - The player types: ``TAKE THE BIRD`` - - .. image:: /images/heidiobj3.* +6. The player types: ``TAKE NEST`` - * - 4. - - The player types: ``GO NORTHEAST`` - - .. image:: /images/heidiobj4.* + .. blockdiag:: /figures/heidiobj6.diag + :align: center + :scale: 80% - * - 5. - - The player types: ``PUT BIRD IN NEST`` - - .. image:: /images/heidiobj5.* +7. The player types: ``UP`` - * - 6. - - The player types: ``TAKE NEST`` - - .. image:: /images/heidiobj6.* + .. blockdiag:: /figures/heidiobj7.diag + :align: center + :scale: 80% - * - 7. - - The player types: ``UP`` - - .. image:: /images/heidiobj7.* +8. The player types: ``PUT NEST ON BRANCH`` - * - 8. - - The player types: ``PUT NEST ON BRANCH`` - - .. image:: /images/heidiobj8.* + .. blockdiag:: /figures/heidiobj8.diag + :align: center + :scale: 80% In this short example, we've taken a lot of time and space to spell out exactly how the objects relationship patterns -- generally known as the