Created
July 2, 2018 03:49
-
-
Save CodePint/b7339d35e29ad13010a59be3a211fcf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# comparing kickers | |
def check_kickers(other) | |
self.highest_hand[:high_cards].reverse! | |
other.highest_hand[:high_cards].reverse! | |
return_value = nil | |
self.highest_hand[:high_cards].each do |self_card| | |
other.highest_hand[:high_cards].each do |other_card| | |
if self_card > other_card | |
return_value = 1 | |
elsif self_card < other_card | |
return_value = 2 | |
end | |
end | |
return_value ||= 3 | |
return return_value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment