;; Initial rules

(in-package 'user)
;; Initial rules

(setq rules '(
  ((or (or Jon-in-CIT closet) meadow-rises) ((Jon-in-CIT t) (sunlab nil)))

  ((and (not lobby) (or (and chew-marks Jon-in-CIT) guard)) ((1st t)))

  ((and meadow-feeding (or Jon-in-CIT (not bamboo-shoots)))
	((monitor t) (two nil)))

  ((and (or security-risk closet) (not sparc)) ((guard t)))

  ((or (and (or pizza consultant) (or table meadow-rises))
	(not sheets)) ((fa nil) (second t)))

  ((and (or ask-help pick-pocket) (and meadow-rises (not stereo)))
	((hot t) (consultant nil)))

  ((or (and Jon-in-CIT (not chew-marks)) (not (or (not guard) (not ask-help))))
	((sheets t)))

  ((and (not bolts) (or meadow-rises meadow-hunts-for-blood)) ((office nil)))

  ((not (or buy-hounddog sunlab)) ((table nil)))

  ((and (and (not office) (not buy-hounddog)) (not a))
	((lobby t)))

  ((and (and meadow-grooms meadow-grooms) (or meadow-feeding table))
	((water nil)))

  ((or (and bolts (and sparc guard))
	 (or (and meadow-rises sparc) meadow-grooms))
	((machine t)))

  ((and (or Jon-in-CIT sunlab-normal)
	 (and need-witness (not meadow-hunts-for-blood)))
	((Macintosh nil)))

  ((or (or (not meadow-ugly) (not chew-marks)) (or sparc sunlab))
	((artsy t)))

  ((and (not (not (not (not (not meadow-hunts-for-blood)))))
        Jon-in-CIT) ((sunlab-normal nil)))

  ((and (or (and sparc (not buy-hounddog)) (not water)) need-witness)
        ((major nil) (appliance t)))

  ((and (not (and meadow-rises meadow-hunts-for-blood))
        (or (not sunlab-normal) closet)) ((plant t) (stereo nil)))

  ((and (not pickup) (or (not water) 
	                  (or (not buy-hounddog) (not (not (not guard))))))
	((so t) (2nd nil)))

  ((not (or stereo (or (not chew-marks) (not meadow-rises))))
	((sparc nil) (a nil)))
))

;; First clues

;; There is a sign that meadow has been mysteriously coming out of
;; the Sparcs. But it hasn't been hunting for blood. What can it mean?

(setq database '(
	(meadow-rises t) (meadow-hunts-for-blood nil)
))

;; CLUE ONE

For the next clue, look under the ____plant____ in the ____Sunlab_____

;; CLUE TWO

You discover chew marks on the plant. There's saliva, and it's GUI.
Has Meadow been feeding?

(setq database (update-database database rules))
(setq database (append '((chew-marks t) (meadow-feeding t)) database))

Check under the _____sparc_____  ____two_____  _____a_____ __monitor___
in the Sunlab

;; CLUE THREE

Under the monitor, you discover that someone's been playing around
with the bolts on Meadow.  It was deliberately released!

(setq database (update-database database rules))
(setq database (append '((bolts nil) (security-risk t)) database))

For the next clue, check at the ____office___ of the CIT ____guard_____

;; CLUE FOUR

You alert the guard to the security leak that allowed Meadow to
escape. He suggests that you might find more information about
the releasing process.

(setq database (update-database database rules))
(setq database (append '((ask-help t)) database))

For the next clue, check in the drawer under ___hot___  ___sheets___
in CIT ___consultant___ office.

;; CLUE FIVE

The consultants say that maybe you should try to see where Meadow
went when it was released.

(setq database (update-database database rules))
(setq database (append '((follow-meadow t) (buy-hounddog nil)) database))
Look under the _____table______ in the outside ___lobby____ of the CIT

;; CLUE SIX

The table in the lobby has a discarded comb, full of gnarls of tangled
code. Obviously it was discarded by Meadow on its way out the door.
Why was Meadow grooming?

(setq database (update-database database rules))
(setq database (append '((meadow-grooms t)) database))

Look under the _____water____ ____machine_____ on the second floor.

;; CLUE SEVEN

It looks like Meadow was grooming, getting ready to go outside.. on a date?
Maybe there was an eyewitness to Meadow leaving.

(setq database (update-database database rules))
(setq database (append '((need-witness t) (meadow-ugly nil)) database))

Look under the _____artsy____ ____Macintosh_____.

;; CLUE EIGHT

The artsy Macintosh saw the whole thing. Meadow went out dressed in
a pizza pier outfit. It's been moonlighting by doing pizza delivery!
Meadow stole the keys so that it could let itself back into the CIT
after hours. Now, where would Meadow go after a late night of driving
pizzas to put the keys?

(setq database (update-database database rules))
(setq database (append '((pizza t) (pickup nil)) database))

The final prize can be found by looking under the ____so____  ____fa___
on the ____second____ floor


Students released Meadow to fetch them pizzas.

Just say nil to drugsp
Lisp is a recursive language. First you curse, and then you recurse.
