container poison

  location : warehouse
  holder   : "can"
  contents : "poison"

methods

  'put...in' :
    if not filled then
      write "But the ", holder, " is empty."
    else if main.dobj = dog_food then {
      write "I dump the ", contents, " into ", 'DEF' -> dog_food, "."
      dog_food.poisoned := TRUE
      filled := FALSE
      }

end


object dog_food

  desc      : "dog food hopper"
  syn       : "dog food|food"
  location  : kennels
  poisoned  : FALSE
  filled    : TRUE

methods

  'get'     : >>It's fastened to the floor.
  'look in' : 'look'
  'look'    : {
    if filled then {
      writes "It's full of dry dog food"
      if poisoned then
        writes " with poison sprinkled on top.  "
      else
        writes ".  "
      }
    else
      writes "It's empty with a little dry dusting of dry dog food on the ",
             "inside.  "
    write "There's a button on the side of the hopper."
    }

end