Message-ID: <3B8128AB.BEAC8B39@csi.com>
Date: Mon, 20 Aug 2001 11:11:39 -0400
From: John Colagioia <JColagioia@csi.com>
Organization: No Conspiracy Here...
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en,fr,ru,es,it,ga,de,ja,gd,eu
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: [Inform] Nice simple straightforward question
References: <9kua39$1ei$1@news.panix.com> <20010819150224.01442.00000863@mb-ci.aol.com> <GIC6zC.B9M@world.std.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.34.37.104
X-Original-NNTP-Posting-Host: 208.34.37.104
X-Trace: excalibur.gbmtech.net 998319808 208.34.37.104 (20 Aug 2001 11:03:28 EST)
Lines: 29
X-Authenticated-User: jnc
X-Original-NNTP-Posting-Host: 127.0.0.1
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!news.tele.dk!small.news.tele.dk!212.177.105.133!news.mailgate.org!zur.uu.net!ash.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:91341

Sean T Barrett wrote:
[...]

> The problem with the continuum of checks where order is not a
> concern is that you either need two copies of your tests (one
> which reports the error condition and one which prints the
> error message), you need one copy with a global variable that
> says whether to print or not (a la 'keep_silent'), or you need
> the one place to be able to return both an error code and a
> printable message. Since that printable message might want to
> print things like the name of the object, it really needs to
> return a little callable function which prints.

[...]

Hm.  What about taking an entirely different approach?  I realize this would be a
nightmare to code, but what about "broadcasting" the action to all objects in scope,
where responding objects would pre-empt the action.

That is, if the player attempts to take an object, all objects are notified by the
player, "I'm going to take the box--anyone have any problems?"  Then, an object (any
object, really) intending to block that action responds, and repeats the process,
until the pre-empting object is no longer pre-empted.  At that point, it completes
the action.

As I said, it'd probably be a nightmare to code, but it would certainly make it
relatively easy to handle all cases.


