lib/euchre/round.rb
#check if player can follow suit or not
check if player can follow suit or not
check if player can follow suit or not
def can_follow_suit
    @current_player.hand.each do |card|
      if !card.nil?
        if card.suit == @first_card_suit && card.value != 10
          return true
        elsif card.suit == @first_card_suit && card.value == 10
          if @first_card_suit == @trump and is_trump(card)
            return true
          elsif !is_trump(card) && card.suit == @first_card_suit
            return true
          end
        end
      end
    end
    return false
  end
def can_follow_suit @current_player . hand . each do | card | if ! card . nil? if card . suit == @first_card_suit && card . value != 10 return true elsif card . suit == @first_card_suit && card . value == 10 if @first_card_suit == @trump and is_trump ( card ) return true elsif ! is_trump ( card ) && card . suit == @first_card_suit return true end end end end return false end
check if player can follow suit or not
check if player can follow suit or not
#check if card has been replaced by nil and skip if so #if not a jack and of same suit okay