the-infocom-files / hitchhiker

The Hitchhiker’s Guide to the Galaxy
21 stars 4 forks source link

You can refer to "dipswitch 0" #27

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

The Nutrimat contains a circuit board with 8 dipswitches numbered 1-8. They don't serve any real function, but you can still interact with them.

>SWITCH DIPSWITCH 1
Switched. Some lights on the Nutrimat flash briefly. A promising hum quickly
dies away.

>SWITCH DIPSWITCH 9
That sentence isn't one I recognise.

>SWITCH DIPSWITCH 0
Switched. Some lights on the Nutrimat flash briefly. A promising hum quickly
dies away.

So you can't switch dipswitch 9, which is correct, but you can turn dipswitch 0 which isn't.

This is how it's handled in V-TURN:

           (<AND <PRSO? ,INTNUM>
             <L? ,P-NUMBER 9>
             <ACCESSIBLE? ,BOARD>>
        <PERFORM ,V?TURN ,DIPSWITCH>
        <RTRUE>)

So it only checks that the number is smaller than 9, not that it's greater than 0.

This check appears in the following routines: