Refactor code in simon_says.rb module.