the-infocom-files / hollywoodhijinx

Hollywood Hijinx
3 stars 2 forks source link

GENERIC-WAX-F probably doesn't work as intended #36

Open eriktorbjorn opened 2 years ago

eriktorbjorn commented 2 years ago

Just like GENERIC-CANDLE-F, the GENERIC-WAX-ROUTINE-F tries to make any single lit candle the preferred one. Unfortunately, the way it's written only one of the RED-HERE, WHITE-HERE and BLUE-HERE variables will ever be set:

     <COND (<AND <FSET? ,RED-CANDLE ,ONBIT>
             <VISIBLE? ,RED-CANDLE>>
        <SET RED-HERE T>)
           (<AND <FSET? ,WHITE-CANDLE ,ONBIT>
             <VISIBLE? ,WHITE-CANDLE>>
        <SET WHITE-HERE T>)
           (<AND <FSET? ,BLUE-CANDLE ,ONBIT>
             <VISIBLE? ,BLUE-CANDLE>>
        <SET BLUE-HERE T>)>
     <COND (<AND .BLUE-HERE
             <NOT .RED-HERE>
             <NOT .WHITE-HERE>>
        <RETURN ,BLUE-WAX>)
           (<AND .RED-HERE
             <NOT .BLUE-HERE>
             <NOT .WHITE-HERE>>
        <RETURN ,RED-WAX>)
           (<AND .WHITE-HERE
             <NOT .BLUE-HERE>
             <NOT .RED-HERE>>
        <RETURN ,WHITE-WAX>)
           (T
        <RFALSE>)>>