Add double run bombs. Logic still incomplete.
This commit is contained in:
parent
03c2f92397
commit
eafbe7693d
@ -60,16 +60,18 @@ class Play < ActiveRecord::Base
|
||||
# current player is not the player to beat
|
||||
if (game.player_to_beat != player)
|
||||
# valid bomb?
|
||||
if (self.hand_type == 'bomb' && game.play_to_beat.try("play").try("hand_type") == 'single' && game.play_to_beat.try("play").try("player_cards")[0].try('rank') == '2')
|
||||
# if (self.hand_type =~ /bomb|double run/ && game.play_to_beat.try("play").try("hand_type") == 'single' && game.play_to_beat.try("play").try("player_cards")[0].try('rank') == '2')
|
||||
if (self.hand_type =~ /bomb|double run/)
|
||||
@truths << true
|
||||
return @truths
|
||||
end
|
||||
else
|
||||
# hand_type match?
|
||||
@truths << (self.hand_type == game.play_to_beat.try("play").try("hand_type")) if game.play_to_beat.try("play").try(:hand_type)
|
||||
# beats?
|
||||
@truths << (self.beats? self.game.play_to_beat.try(:play))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if has_player_cards
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user