Skip to content

Instantly share code, notes, and snippets.

@imownbey
Created December 16, 2008 05:35
Show Gist options
  • Save imownbey/36292 to your computer and use it in GitHub Desktop.
Save imownbey/36292 to your computer and use it in GitHub Desktop.
class Hand
def straight?
values = @cards.map{|card| card.value}.uniq.sort
n = values.shift
while values.first == n || values.count >= 5
n = values.shift
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment