bugfix, misc cleanup
* change 'steve' to 'steven' in hand list * detect Ace-bottomed straights * add Casey to player list
This commit is contained in:
1 parent
60b003181e
commit
9a87aca70c
4 files changed
+93
-88
No files matched your search
@@ -31,7 +31,11 @@ class Hand
|
||||
ranks.each { |s| rank_counts[s] += 1 }
|
||||
|
||||
# test for straight & flush
|
||||
straight = (ranks.sort == (ranks.min .. ranks.max).to_a)
|
||||
straight =
|
||||
ranks.sort == (ranks.min .. ranks.max).to_a ||
|
||||
ranks.sort == [2,3,4,5,14] ||
|
||||
ranks.sort == [2,3,4,5,6,7,8,9,10,14]
|
||||
|
||||
flush = (suits.sort.uniq.size == 1)
|
||||
|
||||
# rank hand
|
||||
|
||||
Reference in new issue
Block a user