Virtual pet in Ruby/Javascript