Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Hand
- def straight?
- values = @cards.map{|card| card.value}.uniq.sort
- values.each do |key, value|
- values.delete_at(key) unless value == values[key - 1] + 1
- end
- values.length >= 5
- end
- end
Add Comment
Please, Sign In to add comment