Update encounter.rb

Slight refactor of code, same functionality