Sha256: 9c74a202be20d800c89cabe74620c7376bf316d1905b62e0e8c9bc674c154a66
Contents?: true
Size: 365 Bytes
Versions: 1
Compression:
Stored size: 365 Bytes
Contents
module GuessWhoNoFuzzy module Comparator def self.better?(contender, best, contender_length, best_length) if contender >= best if contender == best # if the same score, go with simpler option contender_length <= best_length else # if not the same score, we have a winner! true end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
guess_who_no_fuzzy-0.2.0 | lib/guess_who_no_fuzzy/comparator.rb |